From 432aeb74d5a49e6f0efd1063113cef099c93aef6 Mon Sep 17 00:00:00 2001 From: murphy Date: Mon, 28 Dec 2009 07:27:12 +0000 Subject: Copying changes and fixes for 0.9.0rc3 from terminal-encoder branch over to trunk. --- lib/coderay/scanners/java_script.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/coderay/scanners/java_script.rb') diff --git a/lib/coderay/scanners/java_script.rb b/lib/coderay/scanners/java_script.rb index e7edf35..46c8c50 100644 --- a/lib/coderay/scanners/java_script.rb +++ b/lib/coderay/scanners/java_script.rb @@ -21,7 +21,7 @@ module Scanners MAGIC_VARIABLES = %w[ this arguments ] # arguments was introduced in JavaScript 1.4 KEYWORDS_EXPECTING_VALUE = WordList.new.add %w[ - case delete in instanceof new return throw typeof while with + case delete in instanceof new return throw typeof with ] # Reserved for future use. @@ -108,6 +108,7 @@ module Scanners elsif match = scan(/ [$a-zA-Z_][A-Za-z_0-9$]* /x) kind = IDENT_KIND[match] value_expected = (kind == :keyword) && KEYWORDS_EXPECTING_VALUE[match] + # TODO: labels if kind == :ident if match.index(?$) # $ allowed inside an identifier kind = :predefined -- cgit v1.2.1