提交 b5525ea1 编写于 作者: M Matt Bierner 提交者: GitHub

Pick up updated coffeescript grammar (#23123)

* Pick up updated coffeescript grammar Fixes #23104

* Updated test results
上级 47968153
......@@ -54,7 +54,18 @@
"name": "punctuation.definition.string.end.coffee"
}
},
"name": "string.quoted.heredoc.coffee"
"name": "string.quoted.heredoc.coffee",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.definition.escape.backslash.coffee"
}
},
"match": "(\\\\).",
"name": "constant.character.escape.backslash.coffee"
}
]
},
{
"begin": "\"\"\"",
......@@ -72,8 +83,13 @@
"name": "string.quoted.double.heredoc.coffee",
"patterns": [
{
"match": "\\\\.",
"name": "constant.character.escape.coffee"
"captures": {
"1": {
"name": "punctuation.definition.escape.backslash.coffee"
}
},
"match": "(\\\\).",
"name": "constant.character.escape.backslash.coffee"
},
{
"include": "#interpolated_coffee"
......@@ -148,24 +164,23 @@
]
},
{
"begin": "/(?![/*+?])(?=([^\\\\]|\\\\.)*?/[gimuy]*)",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.coffee"
}
},
"end": "(/)[gimuy]*",
"endCaptures": {
"match": "(?<![\\w$])(/)(?![/*+?])(.+?)(/)[gimuy]*(?!\\s*[\\w$/(])",
"captures": {
"1": {
"name": "punctuation.definition.string.begin.coffee"
},
"2": {
"patterns": [
{
"include": "source.js.regexp"
}
]
},
"3": {
"name": "punctuation.definition.string.end.coffee"
}
},
"name": "string.regexp.coffee",
"patterns": [
{
"include": "source.js.regexp"
}
]
"name": "string.regexp.coffee"
},
{
"match": "\\b(?<![\\.\\$])(break|by|catch|continue|else|finally|for|in|of|if|return|switch|then|throw|try|unless|when|while|until|loop|do|(?<=for)\\s+own)(?!\\s*:)\\b",
......@@ -217,7 +232,7 @@
]
},
{
"begin": "(?<=\\s|^)(\\[)(?=[^'\"#]+?}[\\s\\]}]*=)",
"begin": "(?<=\\s|^)(\\[)(?=[^'\"#]+?\\][\\s\\]}]*=)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.destructuring.begin.bracket.square.coffee"
......@@ -423,8 +438,13 @@
"name": "string.quoted.double.coffee",
"patterns": [
{
"match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.coffee"
"captures": {
"1": {
"name": "punctuation.definition.escape.backslash.coffee"
}
},
"match": "(\\\\)(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.backslash.coffee"
},
{
"include": "#interpolated_coffee"
......@@ -499,8 +519,13 @@
"name": "string.quoted.single.coffee",
"patterns": [
{
"match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.coffee"
"captures": {
"1": {
"name": "punctuation.definition.escape.backslash.coffee"
}
},
"match": "(\\\\)(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.backslash.coffee"
}
]
}
......@@ -662,5 +687,5 @@
]
}
},
"version": "https://github.com/atom/language-coffee-script/commit/062904ccd3f81bf3edcd8d21ba6ba38ffb615116"
"version": "https://github.com/atom/language-coffee-script/commit/966587ed53c26944cbee0666a6d6fafd68d19b97"
}
\ No newline at end of file
......@@ -55,62 +55,7 @@
}
},
{
"c": "Hello ",
"t": "source.coffee string.regexp.coffee",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
}
},
{
"c": "(",
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
}
},
{
"c": "\\d",
"t": "source.coffee string.regexp.coffee meta.group.regexp constant.character.character-class.regexp",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
}
},
{
"c": "+",
"t": "source.coffee string.regexp.coffee meta.group.regexp keyword.operator.quantifier.regexp",
"r": {
"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"
}
},
{
"c": ")",
"t": "source.coffee string.regexp.coffee meta.group.regexp punctuation.definition.group.regexp",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
}
},
{
"c": " #{user}",
"c": "Hello (\\d+) #{user}",
"t": "source.coffee string.regexp.coffee",
"r": {
"dark_plus": "string.regexp: #D16969",
......@@ -276,29 +221,29 @@
},
{
"c": "/",
"t": "source.coffee string.regexp.coffee punctuation.definition.string.begin.coffee",
"t": "source.coffee keyword.operator.coffee",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
"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"
}
},
{
"c": "c ",
"t": "source.coffee string.regexp.coffee",
"t": "source.coffee",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": "+",
"t": "source.coffee string.regexp.coffee keyword.operator.quantifier.regexp",
"t": "source.coffee keyword.operator.coffee",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
......@@ -309,35 +254,35 @@
},
{
"c": " d",
"t": "source.coffee string.regexp.coffee",
"t": "source.coffee",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": "/",
"t": "source.coffee string.regexp.coffee punctuation.definition.string.end.coffee",
"t": "source.coffee keyword.operator.coffee",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
"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"
}
},
{
"c": "g",
"t": "source.coffee string.regexp.coffee",
"t": "source.coffee",
"r": {
"dark_plus": "string.regexp: #D16969",
"light_plus": "string.regexp: #811F3F",
"dark_vs": "string.regexp: #D16969",
"light_vs": "string.regexp: #811F3F",
"hc_black": "string.regexp: #D16969"
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册