identifiers can contain a dollar sign

This commit is contained in:
Fabian Jakobs 2010-10-21 13:12:35 +02:00
commit 15f965e966

View file

@ -78,7 +78,9 @@ JavaScriptHighlightRules = function() {
else
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",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)"