diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2016-02-13 10:44:34 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2016-02-13 10:44:34 +0100 |
commit | ee9e8407fb25e3383caa6e8954dc49ada031a538 (patch) | |
tree | 1ece6066a50a4b64d85a4f741c5a1bb9067552a0 /lib/coderay | |
parent | ca3f15f8bb1b23e12bbe0baedaf2c381c466d36b (diff) | |
download | coderay-ee9e8407fb25e3383caa6e8954dc49ada031a538.tar.gz |
cleanup
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/scanners/c2.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/coderay/scanners/c2.rb b/lib/coderay/scanners/c2.rb index 87964f9..7ae382a 100644 --- a/lib/coderay/scanners/c2.rb +++ b/lib/coderay/scanners/c2.rb @@ -77,14 +77,14 @@ module Scanners on %r/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mx, :char on %r/"/, :delimiter, pop, flag_off(:label_expected) on %r/ \\ /x, pop, :error, flag_off(:label_expected) - on %r/ $ /x, pop, flag_off(:label_expected), continue + on %r/ $ /x, pop, flag_off(:label_expected) end state :include_expected do on %r/<[^>\n]+>?|"[^"\n\\]*(?:\\.[^"\n\\]*)*"?/, :include, pop_state on %r/ \s*? \n \s* /x, :space, pop_state on %r/\s+/, :space - on %r//, pop_state, continue # TODO: add otherwise method for this + on %r//, pop_state # TODO: add otherwise method for this end scan_tokens_code = <<-"RUBY" @@ -98,14 +98,14 @@ module Scanners states = [state] until eos? - last_pos = pos + # last_pos = pos case state #{ @code.chomp.gsub(/^/, ' ') } else raise_inspect 'Unknown state: %p' % [state], encoder end - raise_inspect 'nothing was consumed! states = %p' % [states], encoder if pos == last_pos + # raise_inspect 'nothing was consumed! states = %p' % [states], encoder if pos == last_pos end if state == :string |