jsonc strings are wrong color. Fixes #53010

This commit is contained in:
Martin Aeschlimann
2018-06-27 14:34:45 +02:00
parent 7d8a8450f0
commit 0e87ea1c5e
5 changed files with 64 additions and 65 deletions

View File

@@ -6,7 +6,7 @@
],
"version": "https://github.com/Microsoft/vscode-JSON.tmLanguage/commit/9bd83f1c252b375e957203f21793316203f61f70",
"name": "JSON with comments",
"scopeName": "source.jsonc",
"scopeName": "source.json.comments",
"patterns": [
{
"include": "#value"
@@ -17,27 +17,27 @@
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.definition.array.begin.jsonc"
"name": "punctuation.definition.array.begin.json.comments"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.array.end.jsonc"
"name": "punctuation.definition.array.end.json.comments"
}
},
"name": "meta.structure.array.jsonc",
"name": "meta.structure.array.json.comments",
"patterns": [
{
"include": "#value"
},
{
"match": ",",
"name": "punctuation.separator.array.jsonc"
"name": "punctuation.separator.array.json.comments"
},
{
"match": "[^\\s\\]]",
"name": "invalid.illegal.expected-array-separator.jsonc"
"name": "invalid.illegal.expected-array-separator.json.comments"
}
]
},
@@ -47,26 +47,26 @@
"begin": "/\\*\\*(?!/)",
"captures": {
"0": {
"name": "punctuation.definition.comment.jsonc"
"name": "punctuation.definition.comment.json.comments"
}
},
"end": "\\*/",
"name": "comment.block.documentation.jsonc"
"name": "comment.block.documentation.json.comments"
},
{
"begin": "/\\*",
"captures": {
"0": {
"name": "punctuation.definition.comment.jsonc"
"name": "punctuation.definition.comment.json.comments"
}
},
"end": "\\*/",
"name": "comment.block.jsonc"
"name": "comment.block.json.comments"
},
{
"captures": {
"1": {
"name": "punctuation.definition.comment.jsonc"
"name": "punctuation.definition.comment.json.comments"
}
},
"match": "(//).*$\\n?",
@@ -76,26 +76,26 @@
},
"constant": {
"match": "\\b(?:true|false|null)\\b",
"name": "constant.language.jsonc"
"name": "constant.language.json.comments"
},
"number": {
"match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional",
"name": "constant.numeric.jsonc"
"name": "constant.numeric.json.comments"
},
"object": {
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.dictionary.begin.jsonc"
"name": "punctuation.definition.dictionary.begin.json.comments"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.dictionary.end.jsonc"
"name": "punctuation.definition.dictionary.end.json.comments"
}
},
"name": "meta.structure.dictionary.jsonc",
"name": "meta.structure.dictionary.json.comments",
"patterns": [
{
"comment": "the JSON object key",
@@ -108,16 +108,16 @@
"begin": ":",
"beginCaptures": {
"0": {
"name": "punctuation.separator.dictionary.key-value.jsonc"
"name": "punctuation.separator.dictionary.key-value.json.comments"
}
},
"end": "(,)|(?=\\})",
"endCaptures": {
"1": {
"name": "punctuation.separator.dictionary.pair.jsonc"
"name": "punctuation.separator.dictionary.pair.json.comments"
}
},
"name": "meta.structure.dictionary.value.jsonc",
"name": "meta.structure.dictionary.value.json.comments",
"patterns": [
{
"comment": "the JSON object value",
@@ -125,13 +125,13 @@
},
{
"match": "[^\\s,]",
"name": "invalid.illegal.expected-dictionary-separator.jsonc"
"name": "invalid.illegal.expected-dictionary-separator.json.comments"
}
]
},
{
"match": "[^\\s\\}]",
"name": "invalid.illegal.expected-dictionary-separator.jsonc"
"name": "invalid.illegal.expected-dictionary-separator.json.comments"
}
]
},
@@ -139,16 +139,16 @@
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.jsonc"
"name": "punctuation.definition.string.begin.json.comments"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.jsonc"
"name": "punctuation.definition.string.end.json.comments"
}
},
"name": "string.quoted.double.jsonc",
"name": "string.quoted.double.json.comments",
"patterns": [
{
"include": "#stringcontent"
@@ -159,16 +159,16 @@
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.support.type.property-name.begin.jsonc"
"name": "punctuation.support.type.property-name.begin.json.comments"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.support.type.property-name.end.jsonc"
"name": "punctuation.support.type.property-name.end.json.comments"
}
},
"name": "string.jsonc support.type.property-name.jsonc",
"name": "string.json.comments support.type.property-name.json.comments",
"patterns": [
{
"include": "#stringcontent"
@@ -179,11 +179,11 @@
"patterns": [
{
"match": "(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits",
"name": "constant.character.escape.jsonc"
"name": "constant.character.escape.json.comments"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unrecognized-string-escape.jsonc"
"name": "invalid.illegal.unrecognized-string-escape.json.comments"
}
]
},