Fix js highlighting rules

This commit is contained in:
Garen Torikian 2012-06-03 13:51:46 -07:00 committed by nightwing
commit 5007e02502

View file

@ -191,6 +191,22 @@ var JavaScriptHighlightRules = function() {
],
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
next: "function_arguments"
}, { // match stuff like: Sound.play = function play() { }
token : [
"storage.type",
"punctuation.operator",
"entity.name.function",
"text",
"keyword.operator",
"text",
"storage.type",
"text",
"entity.name.function",
"text",
"paren.lparen"
],
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
next: "function_arguments"
}, { // match regular function like: function myFunc(arg) { }
token : [
"storage.type",