2018-06-25 23:30:06 +02:00
{
"information_for_contributors" : [
2020-09-16 01:13:49 +02:00
"This file has been converted from https://github.com/microsoft/vscode-JSON.tmLanguage/blob/master/JSON.tmLanguage" ,
2018-06-25 23:30:06 +02:00
"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."
] ,
2020-09-16 01:13:49 +02:00
"version" : "https://github.com/microsoft/vscode-JSON.tmLanguage/commit/9bd83f1c252b375e957203f21793316203f61f70" ,
2018-06-25 23:30:06 +02:00
"name" : "JSON with comments" ,
2018-06-27 14:34:45 +02:00
"scopeName" : "source.json.comments" ,
2018-06-25 23:30:06 +02:00
"patterns" : [
{
"include" : "#value"
}
] ,
"repository" : {
"array" : {
"begin" : "\\[" ,
"beginCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.array.begin.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"end" : "\\]" ,
"endCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.array.end.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
2018-06-27 14:34:45 +02:00
"name" : "meta.structure.array.json.comments" ,
2018-06-25 23:30:06 +02:00
"patterns" : [
{
"include" : "#value"
} ,
{
"match" : "," ,
2018-06-27 14:34:45 +02:00
"name" : "punctuation.separator.array.json.comments"
2018-06-25 23:30:06 +02:00
} ,
{
"match" : "[^\\s\\]]" ,
2018-06-27 14:34:45 +02:00
"name" : "invalid.illegal.expected-array-separator.json.comments"
2018-06-25 23:30:06 +02:00
}
]
} ,
"comments" : {
"patterns" : [
{
"begin" : "/\\*\\*(?!/)" ,
"captures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.comment.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"end" : "\\*/" ,
2018-06-27 14:34:45 +02:00
"name" : "comment.block.documentation.json.comments"
2018-06-25 23:30:06 +02:00
} ,
{
"begin" : "/\\*" ,
"captures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.comment.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"end" : "\\*/" ,
2018-06-27 14:34:45 +02:00
"name" : "comment.block.json.comments"
2018-06-25 23:30:06 +02:00
} ,
{
"captures" : {
"1" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.comment.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"match" : "(//).*$\\n?" ,
"name" : "comment.line.double-slash.js"
}
]
} ,
"constant" : {
"match" : "\\b(?:true|false|null)\\b" ,
2018-06-27 14:34:45 +02:00
"name" : "constant.language.json.comments"
2018-06-25 23:30:06 +02:00
} ,
"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" ,
2018-06-27 14:34:45 +02:00
"name" : "constant.numeric.json.comments"
2018-06-25 23:30:06 +02:00
} ,
"object" : {
"begin" : "\\{" ,
"beginCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.dictionary.begin.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"end" : "\\}" ,
"endCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.dictionary.end.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
2018-06-27 14:34:45 +02:00
"name" : "meta.structure.dictionary.json.comments" ,
2018-06-25 23:30:06 +02:00
"patterns" : [
{
"comment" : "the JSON object key" ,
"include" : "#objectkey"
} ,
{
"include" : "#comments"
} ,
{
"begin" : ":" ,
"beginCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.separator.dictionary.key-value.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"end" : "(,)|(?=\\})" ,
"endCaptures" : {
"1" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.separator.dictionary.pair.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
2018-06-27 14:34:45 +02:00
"name" : "meta.structure.dictionary.value.json.comments" ,
2018-06-25 23:30:06 +02:00
"patterns" : [
{
"comment" : "the JSON object value" ,
"include" : "#value"
} ,
{
"match" : "[^\\s,]" ,
2018-06-27 14:34:45 +02:00
"name" : "invalid.illegal.expected-dictionary-separator.json.comments"
2018-06-25 23:30:06 +02:00
}
]
} ,
{
"match" : "[^\\s\\}]" ,
2018-06-27 14:34:45 +02:00
"name" : "invalid.illegal.expected-dictionary-separator.json.comments"
2018-06-25 23:30:06 +02:00
}
]
} ,
"string" : {
"begin" : "\"" ,
"beginCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.string.begin.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"end" : "\"" ,
"endCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.definition.string.end.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
2018-06-27 14:34:45 +02:00
"name" : "string.quoted.double.json.comments" ,
2018-06-25 23:30:06 +02:00
"patterns" : [
{
"include" : "#stringcontent"
}
]
} ,
"objectkey" : {
"begin" : "\"" ,
"beginCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.support.type.property-name.begin.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
"end" : "\"" ,
"endCaptures" : {
"0" : {
2018-06-27 14:34:45 +02:00
"name" : "punctuation.support.type.property-name.end.json.comments"
2018-06-25 23:30:06 +02:00
}
} ,
2018-06-27 14:34:45 +02:00
"name" : "string.json.comments support.type.property-name.json.comments" ,
2018-06-25 23:30:06 +02:00
"patterns" : [
{
"include" : "#stringcontent"
}
]
} ,
"stringcontent" : {
"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" ,
2018-06-27 14:34:45 +02:00
"name" : "constant.character.escape.json.comments"
2018-06-25 23:30:06 +02:00
} ,
{
"match" : "\\\\." ,
2018-06-27 14:34:45 +02:00
"name" : "invalid.illegal.unrecognized-string-escape.json.comments"
2018-06-25 23:30:06 +02:00
}
]
} ,
"value" : {
"patterns" : [
{
"include" : "#constant"
} ,
{
"include" : "#number"
} ,
{
"include" : "#string"
} ,
{
"include" : "#array"
} ,
{
"include" : "#object"
} ,
{
"include" : "#comments"
}
]
}
}
2020-11-05 14:50:48 +01:00
}