fix keyword lookup in the tokenizers
This commit is contained in:
parent
554dafd1bf
commit
210dcaf4fd
7 changed files with 24 additions and 26 deletions
|
|
@ -124,13 +124,13 @@ PythonHighlightRules = function() {
|
|||
regex : integer + "\\b"
|
||||
}, {
|
||||
token : function(value) {
|
||||
if (keywords[value])
|
||||
if (keywords.hasOwnProperty(value))
|
||||
return "keyword";
|
||||
else if (builtinConstants[value])
|
||||
else if (builtinConstants.hasOwnProperty(value))
|
||||
return "constant.language";
|
||||
else if (futureReserved[value])
|
||||
else if (futureReserved.hasOwnProperty(value))
|
||||
return "invalid.illegal";
|
||||
else if (builtinFunctions[value])
|
||||
else if (builtinFunctions.hasOwnProperty(value))
|
||||
return "support.function";
|
||||
else if (value == "debugger")
|
||||
return "invalid.deprecated";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue