[cofeescript] update grammar

This commit is contained in:
Martin Aeschlimann 2017-09-25 12:54:58 +02:00
parent 8b350a162c
commit f39d1854f3
2 changed files with 61 additions and 34 deletions

View file

@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-coffee-script/commit/afd48572f9ea27cacb35d885741215ce9d419c6e",
"version": "https://github.com/atom/language-coffee-script/commit/da81e3f537ccbbb70e542fa5af79583eb58ec50b",
"scopeName": "source.coffee",
"name": "CoffeeScript",
"fileTypes": [
@ -90,34 +90,38 @@
]
},
{
"begin": "`",
"beginCaptures": {
"0": {
"match": "(`)(.*)(`)",
"name": "string.quoted.script.coffee",
"captures": {
"1": {
"name": "punctuation.definition.string.begin.coffee"
}
},
"end": "`",
"endCaptures": {
"0": {
},
"2": {
"name": "source.js.embedded.coffee",
"patterns": [
{
"include": "source.js"
}
]
},
"3": {
"name": "punctuation.definition.string.end.coffee"
}
},
"name": "string.quoted.script.coffee",
"contentName": "source.embedded.js",
"patterns": [
{
"include": "source.js"
}
]
}
},
{
"begin": "(?<!#)###(?!#)",
"captures": {
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.coffee"
}
},
"end": "###",
"endCaptures": {
"0": {
"name": "punctuation.definition.comment.coffee"
}
},
"end": "###(?:[ \\t]*\\n)",
"name": "comment.block.coffee",
"patterns": [
{
@ -471,6 +475,33 @@
}
]
},
{
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.definition.array.begin.bracket.square.coffee"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.array.end.bracket.square.coffee"
}
},
"patterns": [
{
"match": "(?<!\\.)\\.{3}",
"name": "keyword.operator.slice.exclusive.coffee"
},
{
"match": "(?<!\\.)\\.{2}",
"name": "keyword.operator.slice.inclusive.coffee"
},
{
"include": "$self"
}
]
},
{
"begin": "\\(",
"beginCaptures": {
@ -490,10 +521,6 @@
}
]
},
{
"match": "\\[|\\]",
"name": "meta.brace.square.coffee"
},
{
"include": "#instance_variable"
},
@ -744,7 +771,7 @@
"name": "constant.numeric.octal.coffee"
},
{
"match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
"match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(?=\\.{2,3}))| # 1 followed by a slice\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
"captures": {
"0": {
"name": "constant.numeric.decimal.coffee"

View file

@ -1002,7 +1002,7 @@
},
{
"c": "[",
"t": "source.coffee meta.brace.square.coffee",
"t": "source.coffee punctuation.definition.array.begin.bracket.square.coffee",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@ -1024,13 +1024,13 @@
},
{
"c": "..",
"t": "source.coffee constant.numeric.decimal.coffee punctuation.separator.decimal.period.coffee",
"t": "source.coffee keyword.operator.slice.inclusive.coffee",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
"dark_vs": "constant.numeric: #B5CEA8",
"light_vs": "constant.numeric: #09885A",
"hc_black": "constant.numeric: #B5CEA8"
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
"dark_vs": "keyword.operator: #D4D4D4",
"light_vs": "keyword.operator: #000000",
"hc_black": "keyword.operator: #D4D4D4"
}
},
{
@ -1046,7 +1046,7 @@
},
{
"c": "]",
"t": "source.coffee meta.brace.square.coffee",
"t": "source.coffee punctuation.definition.array.end.bracket.square.coffee",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@ -1178,7 +1178,7 @@
},
{
"c": "[",
"t": "source.coffee meta.brace.square.coffee",
"t": "source.coffee punctuation.definition.array.begin.bracket.square.coffee",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@ -1299,7 +1299,7 @@
},
{
"c": "]",
"t": "source.coffee meta.brace.square.coffee",
"t": "source.coffee punctuation.definition.array.end.bracket.square.coffee",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",