identifiers can contain a dollar sign
This commit is contained in:
parent
9a8bb6cbf3
commit
15f965e966
1 changed files with 3 additions and 1 deletions
|
|
@ -78,7 +78,9 @@ JavaScriptHighlightRules = function() {
|
||||||
else
|
else
|
||||||
return "identifier";
|
return "identifier";
|
||||||
},
|
},
|
||||||
regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
|
// TODO: Unicode escape sequences
|
||||||
|
// TODO: Unicode identifiers
|
||||||
|
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||||
}, {
|
}, {
|
||||||
token : "operator",
|
token : "operator",
|
||||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)"
|
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue