diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-14 02:49:16 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-14 02:49:16 +0200 |
commit | bf395bd14ed7f63aab84955f6768f59965e3a73e (patch) | |
tree | 870e3ee4980401f43c2dc9a34d2e8343ef3a20ca /lib/coderay/scanners/raydebug.rb | |
parent | ffe0c90999c0b7255a5dfc608c84e683440475b1 (diff) | |
parent | 7493dcbfded42686169027a158c18c5312a3af24 (diff) | |
download | coderay-bf395bd14ed7f63aab84955f6768f59965e3a73e.tar.gz |
Merge branch 'master' into cleanup-output
Diffstat (limited to 'lib/coderay/scanners/raydebug.rb')
-rw-r--r-- | lib/coderay/scanners/raydebug.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/coderay/scanners/raydebug.rb b/lib/coderay/scanners/raydebug.rb index 7a21354..d39d962 100644 --- a/lib/coderay/scanners/raydebug.rb +++ b/lib/coderay/scanners/raydebug.rb @@ -1,11 +1,11 @@ module CodeRay module Scanners - + # = Debug Scanner # # Parses the output of the Encoders::Debug encoder. class Raydebug < Scanner - + register_for :raydebug file_extension 'raydebug' title 'CodeRay Token Dump' @@ -13,11 +13,11 @@ module Scanners protected def scan_tokens encoder, options - + opened_tokens = [] - + until eos? - + if match = scan(/\s+/) encoder.text_token match, :space @@ -26,7 +26,7 @@ module Scanners encoder.text_token kind, :class encoder.text_token '(', :operator match = self[2] - encoder.text_token match, kind.to_sym + encoder.text_token match, kind.to_sym unless match.empty? encoder.text_token match, :operator if match = scan(/\)/) elsif match = scan(/ (\w+) ([<\[]) /x) @@ -59,8 +59,8 @@ module Scanners encoder end - + end - + end end |