From 4e3202d2a2c5c03428b756e06238651dffd6e369 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 20 Nov 2009 15:50:06 +0000 Subject: Reverts r3014 (CodeRay back to 0.7.6). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3079 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../coderay-0.9.0/lib/coderay/scanners/debug.rb | 62 ---------------------- 1 file changed, 62 deletions(-) delete mode 100644 vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb (limited to 'vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb') diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb deleted file mode 100644 index f43564efb..000000000 --- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb +++ /dev/null @@ -1,62 +0,0 @@ -module CodeRay -module Scanners - - # = Debug Scanner - class Debug < Scanner - - include Streamable - register_for :debug - file_extension 'raydebug' - title 'CodeRay Token Dump' - - protected - def scan_tokens tokens, options - - opened_tokens = [] - - until eos? - - kind = nil - match = nil - - if scan(/\s+/) - tokens << [matched, :space] - next - - elsif scan(/ (\w+) \( ( [^\)\\]* ( \\. [^\)\\]* )* ) \) /x) - kind = self[1].to_sym - match = self[2].gsub(/\\(.)/, '\1') - - elsif scan(/ (\w+) < /x) - kind = self[1].to_sym - opened_tokens << kind - match = :open - - elsif scan(/ > /x) - kind = opened_tokens.pop - match = :close - - else - kind = :error - getch - - end - - match ||= matched - if $DEBUG and not kind - raise_inspect 'Error token %p in line %d' % - [[match, kind], line], tokens - end - raise_inspect 'Empty token', tokens unless match - - tokens << [match, kind] - - end - - tokens - end - - end - -end -end -- cgit v1.2.3