Fix js highlighting rules
This commit is contained in:
parent
eac7f7c81a
commit
5007e02502
1 changed files with 16 additions and 0 deletions
|
|
@ -191,6 +191,22 @@ var JavaScriptHighlightRules = function() {
|
||||||
],
|
],
|
||||||
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
||||||
next: "function_arguments"
|
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) { }
|
}, { // match regular function like: function myFunc(arg) { }
|
||||||
token : [
|
token : [
|
||||||
"storage.type",
|
"storage.type",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue