-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsonv.tmLanguage.json
More file actions
153 lines (153 loc) · 4.83 KB
/
Copy pathjsonv.tmLanguage.json
File metadata and controls
153 lines (153 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{
"name": "JSONV",
"scopeName": "source.jsonv",
"patterns": [{ "include": "#value" }],
"repository": {
"comments": {
"patterns": [
{
"begin": "/\\*\\*",
"captures": { "0": { "name": "punctuation.definition.comment.jsonv" } },
"end": "\\*/",
"name": "comment.block.documentation.jsonv"
},
{
"begin": "/\\*",
"captures": { "0": { "name": "punctuation.definition.comment.jsonv" } },
"end": "\\*/",
"name": "comment.block.jsonv"
},
{
"captures": { "1": { "name": "punctuation.definition.comment.jsonv" } },
"match": "(//).*$\\n?",
"name": "comment.line.double-slash.jsonv"
}
]
},
"constant": {
"match": "\\b(?:true|false|null|Infinity|NaN)\\b",
"name": "constant.language.jsonv"
},
"number": {
"match": "(?x)(?:[+-]?(?:0[bB][01_]+|0[oO][0-7_]+|0[xX][0-9A-Fa-f_]+|\\d[\\d_]*)(?:\\.\\d[\\d_]*)?(?:[eE][+-]?\\d[\\d_]*)?n?)",
"name": "constant.numeric.jsonv"
},
"stringcontent": {
"patterns": [
{
"match": "(?x)\\\\(?:[\\\\/bfnrt\"'`]|u[0-9a-fA-F]{4})",
"name": "constant.character.escape.jsonv"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unrecognized-string-escape.jsonv"
}
]
},
"string": {
"patterns": [
{
"begin": "\"",
"beginCaptures": { "0": { "name": "punctuation.definition.string.begin.jsonv" } },
"end": "\"",
"endCaptures": { "0": { "name": "punctuation.definition.string.end.jsonv" } },
"name": "string.quoted.double.jsonv",
"patterns": [{ "include": "#stringcontent" }]
},
{
"begin": "'",
"beginCaptures": { "0": { "name": "punctuation.definition.string.begin.jsonv" } },
"end": "'",
"endCaptures": { "0": { "name": "punctuation.definition.string.end.jsonv" } },
"name": "string.quoted.single.jsonv",
"patterns": [{ "include": "#stringcontent" }]
},
{
"begin": "`",
"beginCaptures": { "0": { "name": "punctuation.definition.string.begin.jsonv" } },
"end": "`",
"endCaptures": { "0": { "name": "punctuation.definition.string.end.jsonv" } },
"name": "string.quoted.template.jsonv",
"patterns": [
{ "include": "#stringcontent" },
{
"begin": "\\$\\{",
"end": "\\}",
"name": "meta.template.expression.jsonv",
"patterns": [{ "include": "#value" }]
}
]
}
]
},
"objectkey": {
"patterns": [
{
"begin": "\"",
"beginCaptures": { "0": { "name": "punctuation.support.type.property-name.begin.jsonv" } },
"end": "\"",
"endCaptures": { "0": { "name": "punctuation.support.type.property-name.end.jsonv" } },
"name": "string.quoted.double.jsonv.support.type.property-name.jsonv",
"patterns": [{ "include": "#stringcontent" }]
},
{
"begin": "'",
"beginCaptures": { "0": { "name": "punctuation.support.type.property-name.begin.jsonv" } },
"end": "'",
"endCaptures": { "0": { "name": "punctuation.support.type.property-name.end.jsonv" } },
"name": "string.quoted.single.jsonv.support.type.property-name.jsonv",
"patterns": [{ "include": "#stringcontent" }]
},
{
"match": "\\b[$A-Za-z_][\\w$]*\\b(?=\\s*:)",
"name": "support.type.property-name.jsonv"
}
]
},
"array": {
"begin": "\\[",
"beginCaptures": { "0": { "name": "punctuation.definition.array.begin.jsonv" } },
"end": "\\]",
"endCaptures": { "0": { "name": "punctuation.definition.array.end.jsonv" } },
"name": "meta.structure.array.jsonv",
"patterns": [
{ "include": "#value" },
{ "match": ",", "name": "punctuation.separator.array.jsonv" },
{ "match": "[^\\s\\]]", "name": "invalid.illegal.expected-array-separator.jsonv" }
]
},
"object": {
"begin": "\\{",
"beginCaptures": { "0": { "name": "punctuation.definition.dictionary.begin.jsonv" } },
"end": "\\}",
"endCaptures": { "0": { "name": "punctuation.definition.dictionary.end.jsonv" } },
"name": "meta.structure.dictionary.jsonv",
"patterns": [
{ "comment": "the JSON object key", "include": "#objectkey" },
{ "include": "#comments" },
{
"begin": ":",
"beginCaptures": { "0": { "name": "punctuation.separator.dictionary.key-value.jsonv" } },
"end": "(,)|(?=\\})",
"endCaptures": { "1": { "name": "punctuation.separator.dictionary.pair.jsonv" } },
"name": "meta.structure.dictionary.value.jsonv",
"patterns": [
{ "comment": "the JSON object value", "include": "#value" },
{ "match": "[^\\s,]", "name": "invalid.illegal.expected-dictionary-separator.jsonv" }
]
},
{ "match": "[^\\s\\}]", "name": "invalid.illegal.expected-dictionary-separator.jsonv" }
]
},
"value": {
"patterns": [
{ "include": "#string" },
{ "include": "#constant" },
{ "include": "#number" },
{ "include": "#array" },
{ "include": "#object" },
{ "include": "#comments" }
]
}
}
}