diff options
author | murphy <murphy@rubychan.de> | 2010-03-26 03:18:12 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-03-26 03:18:12 +0000 |
commit | 7fd577f8c2959902c4eb79d3c20b70a274e41618 (patch) | |
tree | de117473e8d308f08900514dfcf0c27e9acfea53 /lib/coderay/scanners/css.rb | |
parent | cfa0257f846a01e6777e6e620751165410b328c8 (diff) | |
download | coderay-7fd577f8c2959902c4eb79d3c20b70a274e41618.tar.gz |
Cleanups for C, C++, CSS, Delphi, Groovy, Java, PHP, Python, RHTML, XML, and YAML scanners.
Diffstat (limited to 'lib/coderay/scanners/css.rb')
-rw-r--r-- | lib/coderay/scanners/css.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/coderay/scanners/css.rb b/lib/coderay/scanners/css.rb index 93e8d80..1806d24 100644 --- a/lib/coderay/scanners/css.rb +++ b/lib/coderay/scanners/css.rb @@ -11,9 +11,9 @@ module Scanners :constant, :directive, :key, :value, :operator, :color, :float, :error, :important, - ] + ] # :nodoc: - module RE + module RE # :nodoc: NonASCII = /[\x80-\xFF]/ Hex = /[0-9a-fA-F]/ Unicode = /\\#{Hex}{1,6}(?:\r\n|\s)?/ # differs from standard because it allows uppercase hex too @@ -47,9 +47,10 @@ module Scanners Class = /\.#{Name}/ PseudoClass = /:#{Name}/ AttributeSelector = /\[[^\]]*\]?/ - end - + + protected + def scan_tokens tokens, options value_expected = nil @@ -191,7 +192,7 @@ module Scanners end match ||= matched - if $DEBUG and not kind + if $CODERAY_DEBUG and not kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens end |