tm-grammars 1.7.2 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,206 @@
1
+ {
2
+ "displayName": "Fluent",
3
+ "name": "fluent",
4
+ "patterns": [
5
+ {
6
+ "include": "#comment"
7
+ },
8
+ {
9
+ "include": "#message"
10
+ },
11
+ {
12
+ "include": "#wrong-line"
13
+ }
14
+ ],
15
+ "repository": {
16
+ "attributes": {
17
+ "begin": "\\s*(\\.[a-zA-Z][a-zA-Z0-9_-]*\\s*=\\s*)",
18
+ "beginCaptures": {
19
+ "1": {
20
+ "name": "support.class.attribute-begin.fluent"
21
+ }
22
+ },
23
+ "end": "^(?=\\s*[^\\.])",
24
+ "patterns": [
25
+ {
26
+ "include": "#placeable"
27
+ }
28
+ ]
29
+ },
30
+ "comment": {
31
+ "match": "^##?#?\\s.*$",
32
+ "name": "comment.fluent"
33
+ },
34
+ "function-comma": {
35
+ "match": ",",
36
+ "name": "support.function.function-comma.fluent"
37
+ },
38
+ "function-named-argument": {
39
+ "begin": "([a-zA-Z0-9]+:)\\s*([\"a-zA-Z0-9]+)",
40
+ "beginCaptures": {
41
+ "1": {
42
+ "name": "support.function.named-argument.name.fluent"
43
+ },
44
+ "2": {
45
+ "name": "variable.other.named-argument.value.fluent"
46
+ }
47
+ },
48
+ "end": "(?=\\)|,|\\s)",
49
+ "name": "variable.other.named-argument.fluent"
50
+ },
51
+ "function-positional-argument": {
52
+ "match": "\\$[a-zA-Z0-9_-]+",
53
+ "name": "variable.other.function.positional-argument.fluent"
54
+ },
55
+ "invalid-placeable-string-missing-end-quote": {
56
+ "match": "\"[^\"]+$",
57
+ "name": "invalid.illegal.wrong-placeable-missing-end-quote.fluent"
58
+ },
59
+ "invalid-placeable-wrong-placeable-missing-end": {
60
+ "match": "([^}A-Z]*$|[^-][^>]$)\\b",
61
+ "name": "invalid.illegal.wrong-placeable-missing-end.fluent"
62
+ },
63
+ "message": {
64
+ "begin": "^(-?[a-zA-Z][a-zA-Z0-9_-]*\\s*=\\s*)",
65
+ "beginCaptures": {
66
+ "1": {
67
+ "name": "support.class.message-identifier.fluent"
68
+ }
69
+ },
70
+ "contentName": "string.fluent",
71
+ "end": "^(?=\\S)",
72
+ "patterns": [
73
+ {
74
+ "include": "#attributes"
75
+ },
76
+ {
77
+ "include": "#placeable"
78
+ }
79
+ ]
80
+ },
81
+ "placeable": {
82
+ "begin": "({)",
83
+ "beginCaptures": {
84
+ "1": {
85
+ "name": "keyword.placeable.begin.fluent"
86
+ }
87
+ },
88
+ "contentName": "variable.other.placeable.content.fluent",
89
+ "end": "(})",
90
+ "endCaptures": {
91
+ "1": {
92
+ "name": "keyword.placeable.end.fluent"
93
+ }
94
+ },
95
+ "patterns": [
96
+ {
97
+ "include": "#placeable-string"
98
+ },
99
+ {
100
+ "include": "#placeable-function"
101
+ },
102
+ {
103
+ "include": "#placeable-reference-or-number"
104
+ },
105
+ {
106
+ "include": "#selector"
107
+ },
108
+ {
109
+ "include": "#invalid-placeable-wrong-placeable-missing-end"
110
+ },
111
+ {
112
+ "include": "#invalid-placeable-string-missing-end-quote"
113
+ },
114
+ {
115
+ "include": "#invalid-placeable-wrong-function-name"
116
+ }
117
+ ]
118
+ },
119
+ "placeable-function": {
120
+ "begin": "([A-Z][A-Z0-9_-]*\\()",
121
+ "beginCaptures": {
122
+ "1": {
123
+ "name": "support.function.placeable-function.call.begin.fluent"
124
+ }
125
+ },
126
+ "contentName": "string.placeable-function.fluent",
127
+ "end": "(\\))",
128
+ "endCaptures": {
129
+ "1": {
130
+ "name": "support.function.placeable-function.call.end.fluent"
131
+ }
132
+ },
133
+ "patterns": [
134
+ {
135
+ "include": "#function-comma"
136
+ },
137
+ {
138
+ "include": "#function-positional-argument"
139
+ },
140
+ {
141
+ "include": "#function-named-argument"
142
+ }
143
+ ]
144
+ },
145
+ "placeable-reference-or-number": {
146
+ "match": "((-|\\$)[a-zA-Z0-9_-]+|[a-zA-Z][a-zA-Z0-9_-]*|[0-9]+)",
147
+ "name": "variable.other.placeable.reference-or-number.fluent"
148
+ },
149
+ "placeable-string": {
150
+ "begin": "(\")(?=[^\\n]*\")",
151
+ "beginCaptures": {
152
+ "1": {
153
+ "name": "variable.other.placeable-string-begin.fluent"
154
+ }
155
+ },
156
+ "contentName": "string.placeable-string-content.fluent",
157
+ "end": "(\")",
158
+ "endCaptures": {
159
+ "1": {
160
+ "name": "variable.other.placeable-string-end.fluent"
161
+ }
162
+ }
163
+ },
164
+ "selector": {
165
+ "begin": "(->)",
166
+ "beginCaptures": {
167
+ "1": {
168
+ "name": "support.function.selector.begin.fluent"
169
+ }
170
+ },
171
+ "contentName": "string.selector.content.fluent",
172
+ "end": "^(?=\\s*})",
173
+ "patterns": [
174
+ {
175
+ "include": "#selector-item"
176
+ }
177
+ ]
178
+ },
179
+ "selector-item": {
180
+ "begin": "(\\s*\\*?\\[)([a-zA-Z0-9_-]+)(\\]\\s*)",
181
+ "beginCaptures": {
182
+ "1": {
183
+ "name": "support.function.selector-item.begin.fluent"
184
+ },
185
+ "2": {
186
+ "name": "variable.other.selector-item.begin.fluent"
187
+ },
188
+ "3": {
189
+ "name": "support.function.selector-item.begin.fluent"
190
+ }
191
+ },
192
+ "contentName": "string.selector-item.content.fluent",
193
+ "end": "^(?=(\\s*})|(\\s*\\[)|(\\s*\\*))",
194
+ "patterns": [
195
+ {
196
+ "include": "#placeable"
197
+ }
198
+ ]
199
+ },
200
+ "wrong-line": {
201
+ "match": ".*",
202
+ "name": "invalid.illegal.wrong-line.fluent"
203
+ }
204
+ },
205
+ "scopeName": "source.ftl"
206
+ }
@@ -0,0 +1,194 @@
1
+ {
2
+ "displayName": "Genie",
3
+ "fileTypes": [
4
+ "gs"
5
+ ],
6
+ "name": "genie",
7
+ "patterns": [
8
+ {
9
+ "include": "#code"
10
+ }
11
+ ],
12
+ "repository": {
13
+ "code": {
14
+ "patterns": [
15
+ {
16
+ "include": "#comments"
17
+ },
18
+ {
19
+ "include": "#constants"
20
+ },
21
+ {
22
+ "include": "#strings"
23
+ },
24
+ {
25
+ "include": "#keywords"
26
+ },
27
+ {
28
+ "include": "#types"
29
+ },
30
+ {
31
+ "include": "#functions"
32
+ },
33
+ {
34
+ "include": "#variables"
35
+ }
36
+ ]
37
+ },
38
+ "comments": {
39
+ "patterns": [
40
+ {
41
+ "captures": {
42
+ "0": {
43
+ "name": "punctuation.definition.comment.vala"
44
+ }
45
+ },
46
+ "match": "/\\*\\*/",
47
+ "name": "comment.block.empty.vala"
48
+ },
49
+ {
50
+ "include": "text.html.javadoc"
51
+ },
52
+ {
53
+ "include": "#comments-inline"
54
+ }
55
+ ]
56
+ },
57
+ "comments-inline": {
58
+ "patterns": [
59
+ {
60
+ "begin": "/\\*",
61
+ "captures": {
62
+ "0": {
63
+ "name": "punctuation.definition.comment.vala"
64
+ }
65
+ },
66
+ "end": "\\*/",
67
+ "name": "comment.block.vala"
68
+ },
69
+ {
70
+ "captures": {
71
+ "1": {
72
+ "name": "comment.line.double-slash.vala"
73
+ },
74
+ "2": {
75
+ "name": "punctuation.definition.comment.vala"
76
+ }
77
+ },
78
+ "match": "\\s*((//).*$\\n?)"
79
+ }
80
+ ]
81
+ },
82
+ "constants": {
83
+ "patterns": [
84
+ {
85
+ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b",
86
+ "name": "constant.numeric.vala"
87
+ },
88
+ {
89
+ "match": "\\b([A-Z][A-Z0-9_]+)\\b",
90
+ "name": "variable.other.constant.vala"
91
+ }
92
+ ]
93
+ },
94
+ "functions": {
95
+ "patterns": [
96
+ {
97
+ "match": "(\\w+)(?=\\s*(<[\\s\\w.]+>\\s*)?\\()",
98
+ "name": "entity.name.function.vala"
99
+ }
100
+ ]
101
+ },
102
+ "keywords": {
103
+ "patterns": [
104
+ {
105
+ "match": "(?<=^|[^@\\w\\.])(as|do|if|in|is|of|or|to|and|def|for|get|isa|new|not|out|ref|set|try|var|case|dict|else|enum|init|list|lock|null|pass|prop|self|true|uses|void|weak|when|array|async|break|class|const|event|false|final|owned|print|super|raise|while|yield|assert|delete|downto|except|extern|inline|params|public|raises|return|sealed|sizeof|static|struct|typeof|default|dynamic|ensures|finally|private|unowned|virtual|abstract|continue|delegate|internal|override|readonly|requires|volatile|construct|errordomain|interface|namespace|protected|implements)\\b",
106
+ "name": "keyword.vala"
107
+ },
108
+ {
109
+ "match": "(?<=^|[^@\\w\\.])(bool|double|float|unichar|char|uchar|int|uint|long|ulong|short|ushort|size_t|ssize_t|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b",
110
+ "name": "keyword.vala"
111
+ },
112
+ {
113
+ "match": "(#if|#elif|#else|#endif)",
114
+ "name": "keyword.vala"
115
+ }
116
+ ]
117
+ },
118
+ "strings": {
119
+ "patterns": [
120
+ {
121
+ "begin": "\"\"\"",
122
+ "end": "\"\"\"",
123
+ "name": "string.quoted.triple.vala"
124
+ },
125
+ {
126
+ "begin": "@\"",
127
+ "end": "\"",
128
+ "name": "string.quoted.interpolated.vala",
129
+ "patterns": [
130
+ {
131
+ "match": "\\\\.",
132
+ "name": "constant.character.escape.vala"
133
+ },
134
+ {
135
+ "match": "\\$\\w+",
136
+ "name": "constant.character.escape.vala"
137
+ },
138
+ {
139
+ "match": "\\$\\(([^)(]|\\(([^)(]|\\([^)]*\\))*\\))*\\)",
140
+ "name": "constant.character.escape.vala"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "begin": "\"",
146
+ "end": "\"",
147
+ "name": "string.quoted.double.vala",
148
+ "patterns": [
149
+ {
150
+ "match": "\\\\.",
151
+ "name": "constant.character.escape.vala"
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ "begin": "'",
157
+ "end": "'",
158
+ "name": "string.quoted.single.vala",
159
+ "patterns": [
160
+ {
161
+ "match": "\\\\.",
162
+ "name": "constant.character.escape.vala"
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "match": "/((\\\\/)|([^/]))*/(?=\\s*[,;)\\.\\n])",
168
+ "name": "string.regexp.vala"
169
+ }
170
+ ]
171
+ },
172
+ "types": {
173
+ "patterns": [
174
+ {
175
+ "match": "(?<=^|[^@\\w\\.])(bool|double|float|unichar|char|uchar|int|uint|long|ulong|short|ushort|size_t|ssize_t|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b",
176
+ "name": "storage.type.primitive.vala"
177
+ },
178
+ {
179
+ "match": "\\b([A-Z]+\\w*)\\b",
180
+ "name": "entity.name.type.vala"
181
+ }
182
+ ]
183
+ },
184
+ "variables": {
185
+ "patterns": [
186
+ {
187
+ "match": "\\b([_a-z]+\\w*)\\b",
188
+ "name": "variable.other.vala"
189
+ }
190
+ ]
191
+ }
192
+ },
193
+ "scopeName": "source.genie"
194
+ }