diff options
author | murphy <murphy@rubychan.de> | 2010-04-15 00:18:47 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-04-15 00:18:47 +0000 |
commit | 5b780920ea3224e3973c582b7aed03929c1003d7 (patch) | |
tree | 6964de8e838b00649f0a61ac4307515b32fe85c3 /lib/coderay/scanners | |
parent | b9a5e582ff24d361766b34c8360ed85db6dbf279 (diff) | |
download | coderay-5b780920ea3224e3973c582b7aed03929c1003d7.tar.gz |
Cleanups.
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r-- | lib/coderay/scanners/ruby.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index 5317d62..e4de0d1 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -39,8 +39,8 @@ module Scanners heredocs = nil inline_block_stack = nil inline_block_curly_depth = 0 - def_object_stack = nil - def_object_paren_depth = 0 + # def_object_stack = nil + # def_object_paren_depth = 0 unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8' patterns = Patterns # avoid constant lookup @@ -402,6 +402,15 @@ module Scanners next end + elsif state == :undef_comma_expected + if match = scan(/,/) + kind = :operator + state = :undef_expected + else + state = :initial + next + end + elsif state == :alias_expected match = scan(unicode ? /(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/uo : /(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/o) @@ -414,15 +423,6 @@ module Scanners state = :initial next - elsif state == :undef_comma_expected - if match = scan(/,/) - kind = :operator - state = :undef_expected - else - state = :initial - next - end - end if $CODERAY_DEBUG and not kind |