diff options
author | murphy <murphy@rubychan.de> | 2009-12-28 07:27:12 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2009-12-28 07:27:12 +0000 |
commit | 432aeb74d5a49e6f0efd1063113cef099c93aef6 (patch) | |
tree | f300ae05c2418721ea188ca1acc763cff06e71b7 /lib/coderay/scanners/java_script.rb | |
parent | 1982b2bf7e7bfa333838cf2f3e7613c00d2a67c3 (diff) | |
download | coderay-432aeb74d5a49e6f0efd1063113cef099c93aef6.tar.gz |
Copying changes and fixes for 0.9.0rc3 from terminal-encoder branch over to trunk.
Diffstat (limited to 'lib/coderay/scanners/java_script.rb')
-rw-r--r-- | lib/coderay/scanners/java_script.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |