From 7fd577f8c2959902c4eb79d3c20b70a274e41618 Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 26 Mar 2010 03:18:12 +0000 Subject: Cleanups for C, C++, CSS, Delphi, Groovy, Java, PHP, Python, RHTML, XML, and YAML scanners. --- lib/coderay/scanners/css.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/coderay/scanners/css.rb') 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 -- cgit v1.2.1