Skip to content

Commit

Permalink
- Added the support for UTF-8 characters. The patch was originally pr…
Browse files Browse the repository at this point in the history
…oposed by hagabaka on github: http://github.com/hagabaka/treetop/commit/aff5a7e08200fbe7d1e047bb101256be377bab92

- All specs still pass.
- Oops, checked in a stale (incorrectly merged) file
  • Loading branch information
Nicolas Fouché authored and cjheath committed Aug 21, 2009
1 parent 2c66175 commit 7329c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/treetop/compiler/node_classes/character_class.rb
Expand Up @@ -5,8 +5,8 @@ def compile(address, builder, parent_expression = nil)
super

builder.if__ "has_terminal?(#{grounded_regexp(text_value)}, true, index)" do
builder << 'next_character = index + input[index..-1].match(/\A(.)/um).end(1)'
if address == 0 || decorated?
builder << 'next_character = index + input[index..-1].match(/\A(.)/um).end(1)'
assign_result "instantiate_node(#{node_class_name}, input, index...next_character)"
extend_result_with_inline_module
else
Expand Down

0 comments on commit 7329c80

Please sign in to comment.