fix keyword lookup in the tokenizers
This commit is contained in:
parent
554dafd1bf
commit
210dcaf4fd
7 changed files with 24 additions and 26 deletions
|
|
@ -104,11 +104,11 @@ JavaScriptHighlightRules = function() {
|
|||
token : function(value) {
|
||||
if (value == "this")
|
||||
return "variable.language";
|
||||
else if (keywords[value])
|
||||
else if (keywords.hasOwnProperty(value))
|
||||
return "keyword";
|
||||
else if (buildinConstants[value])
|
||||
else if (buildinConstants.hasOwnProperty(value))
|
||||
return "constant.language";
|
||||
else if (futureReserved[value])
|
||||
else if (futureReserved.hasOwnProperty(value))
|
||||
return "invalid.illegal";
|
||||
else if (value == "debugger")
|
||||
return "invalid.deprecated";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue