coffeehaml 0.6.0 → 0.7.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.
- package/README.md +21 -5
- package/dist/ast.js +334 -123
- package/dist/cli.js +363 -291
- package/dist/compiler.js +126 -89
- package/dist/emitter.js +771 -736
- package/dist/errors.js +5 -2
- package/dist/expressions.js +211 -154
- package/dist/index.js +22 -4
- package/dist/lexer.js +536 -340
- package/dist/parser.js +533 -432
- package/dist/prettier/coffeescript-formatter.js +309 -0
- package/dist/prettier/index.js +105 -0
- package/dist/prettier/options.js +232 -0
- package/dist/prettier/printer.js +559 -0
- package/dist/src/ast.js +338 -0
- package/dist/src/cli.js +430 -0
- package/dist/src/compiler.js +132 -0
- package/dist/src/emitter.js +791 -0
- package/dist/src/errors.js +5 -0
- package/dist/src/expressions.js +223 -0
- package/dist/src/index.js +22 -0
- package/dist/src/lexer.js +504 -0
- package/dist/src/parser.js +575 -0
- package/dist/src/types.js +122 -0
- package/dist/src/vite-plugin.js +78 -0
- package/dist/types.js +122 -12
- package/dist/vite-plugin.js +78 -63
- package/docs/examples.md +201 -1
- package/docs/grammar.md +90 -1
- package/docs/index.html +260 -37
- package/package.json +12 -10
- package/syntaxes/CoffeeHaml.tmLanguage +815 -868
- package/syntaxes/coffeehaml.tmLanguage.json +352 -161
- package/dist/ast.d.ts +0 -117
- package/dist/ast.d.ts.map +0 -1
- package/dist/ast.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/compiler.d.ts +0 -10
- package/dist/compiler.d.ts.map +0 -1
- package/dist/compiler.js.map +0 -1
- package/dist/emitter.d.ts +0 -4
- package/dist/emitter.d.ts.map +0 -1
- package/dist/emitter.js.map +0 -1
- package/dist/errors.d.ts +0 -3
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/expressions.d.ts +0 -22
- package/dist/expressions.d.ts.map +0 -1
- package/dist/expressions.js.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lexer.d.ts +0 -30
- package/dist/lexer.d.ts.map +0 -1
- package/dist/lexer.js.map +0 -1
- package/dist/parser.d.ts +0 -10
- package/dist/parser.d.ts.map +0 -1
- package/dist/parser.js.map +0 -1
- package/dist/types.d.ts +0 -76
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/vite-plugin.d.ts +0 -7
- package/dist/vite-plugin.d.ts.map +0 -1
- package/dist/vite-plugin.js.map +0 -1
|
@@ -1,133 +1,225 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
|
+
"uuid": "1EEA33FD-AEAC-4C44-9EB6-D4D0D9E5C9CB",
|
|
3
4
|
"name": "CoffeeHaml",
|
|
4
5
|
"scopeName": "source.coffeehaml",
|
|
5
|
-
"fileTypes": [
|
|
6
|
+
"fileTypes": [
|
|
7
|
+
"chaml",
|
|
8
|
+
"coffeehaml"
|
|
9
|
+
],
|
|
6
10
|
"patterns": [
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{
|
|
11
|
+
{
|
|
12
|
+
"include": "#prologue"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"include": "#comment-haml"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"include": "#comment-html"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"include": "#doctype"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"include": "#element"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"include": "#implicit-div"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"include": "#control-flow"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"include": "#output"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"include": "#filter"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"include": "#text"
|
|
40
|
+
}
|
|
17
41
|
],
|
|
18
42
|
"repository": {
|
|
19
|
-
|
|
20
43
|
"prologue": {
|
|
21
44
|
"name": "meta.prologue.coffeehaml",
|
|
22
45
|
"match": "^(import\\b.*|export\\b.*|const\\b.*|let\\b.*|var\\b.*|function\\b.*|class\\b.*|@\\w+.*|type\\b.*|interface\\b.*|enum\\b.*)$",
|
|
23
46
|
"captures": {
|
|
24
|
-
"0": {
|
|
47
|
+
"0": {
|
|
48
|
+
"patterns": [
|
|
49
|
+
{
|
|
50
|
+
"include": "source.coffee"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
25
54
|
}
|
|
26
55
|
},
|
|
27
|
-
|
|
28
56
|
"comment-haml": {
|
|
29
57
|
"name": "comment.line.haml.coffeehaml",
|
|
30
58
|
"match": "^(\\s*)(-#)\\s*(.*)$",
|
|
31
59
|
"captures": {
|
|
32
|
-
"2": {
|
|
33
|
-
|
|
60
|
+
"2": {
|
|
61
|
+
"name": "punctuation.definition.comment.coffeehaml"
|
|
62
|
+
},
|
|
63
|
+
"3": {
|
|
64
|
+
"name": "comment.line.haml.coffeehaml"
|
|
65
|
+
}
|
|
34
66
|
}
|
|
35
67
|
},
|
|
36
|
-
|
|
37
68
|
"comment-html": {
|
|
38
69
|
"name": "comment.block.html.coffeehaml",
|
|
39
70
|
"match": "^(\\s*)(/)\\s*(.*)$",
|
|
40
71
|
"captures": {
|
|
41
|
-
"2": {
|
|
42
|
-
|
|
72
|
+
"2": {
|
|
73
|
+
"name": "punctuation.definition.comment.coffeehaml"
|
|
74
|
+
},
|
|
75
|
+
"3": {
|
|
76
|
+
"name": "comment.block.html.coffeehaml"
|
|
77
|
+
}
|
|
43
78
|
}
|
|
44
79
|
},
|
|
45
|
-
|
|
46
80
|
"doctype": {
|
|
47
81
|
"name": "meta.doctype.coffeehaml",
|
|
48
82
|
"match": "^(\\s*)(!!!)\\s*(.*)$",
|
|
49
83
|
"captures": {
|
|
50
|
-
"2": {
|
|
51
|
-
|
|
84
|
+
"2": {
|
|
85
|
+
"name": "keyword.other.doctype.coffeehaml"
|
|
86
|
+
},
|
|
87
|
+
"3": {
|
|
88
|
+
"name": "string.unquoted.coffeehaml"
|
|
89
|
+
}
|
|
52
90
|
}
|
|
53
91
|
},
|
|
54
|
-
|
|
55
92
|
"element": {
|
|
56
93
|
"name": "meta.tag.coffeehaml",
|
|
57
94
|
"begin": "^(\\s*)(%)([\\w-]+(?:\\:[\\w-]+)*)",
|
|
58
95
|
"beginCaptures": {
|
|
59
|
-
"2": {
|
|
60
|
-
|
|
96
|
+
"2": {
|
|
97
|
+
"name": "punctuation.definition.tag.coffeehaml"
|
|
98
|
+
},
|
|
99
|
+
"3": {
|
|
100
|
+
"name": "entity.name.tag.coffeehaml"
|
|
101
|
+
}
|
|
61
102
|
},
|
|
62
103
|
"end": "$",
|
|
63
104
|
"patterns": [
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
105
|
+
{
|
|
106
|
+
"include": "#self-close"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"include": "#modifiers"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"include": "#attribute-brace"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"include": "#attribute-paren"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"include": "#inline-output"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"include": "#inline-text"
|
|
122
|
+
}
|
|
70
123
|
]
|
|
71
124
|
},
|
|
72
|
-
|
|
73
125
|
"implicit-div": {
|
|
74
126
|
"name": "meta.tag.implicit.coffeehaml",
|
|
75
127
|
"begin": "^(\\s*)([.#])([\\w-]+)",
|
|
76
128
|
"beginCaptures": {
|
|
77
|
-
"2": {
|
|
129
|
+
"2": {
|
|
130
|
+
"name": "punctuation.definition.tag.coffeehaml"
|
|
131
|
+
},
|
|
132
|
+
"3": {
|
|
133
|
+
"name": "entity.name.tag.coffeehaml"
|
|
134
|
+
}
|
|
78
135
|
},
|
|
79
136
|
"end": "$",
|
|
80
137
|
"patterns": [
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
|
|
138
|
+
{
|
|
139
|
+
"include": "#modifiers"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"include": "#attribute-brace"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"include": "#attribute-paren"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"include": "#inline-output"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"include": "#inline-text"
|
|
152
|
+
}
|
|
86
153
|
]
|
|
87
154
|
},
|
|
88
|
-
|
|
89
155
|
"self-close": {
|
|
90
156
|
"name": "keyword.operator.self-close.coffeehaml",
|
|
91
157
|
"match": "/(?=\\s|$)"
|
|
92
158
|
},
|
|
93
|
-
|
|
94
159
|
"modifiers": {
|
|
95
160
|
"patterns": [
|
|
96
161
|
{
|
|
97
|
-
"name": "entity.
|
|
162
|
+
"name": "entity.name.tag.class.coffeehaml",
|
|
98
163
|
"match": "\\.([\\w-]+)",
|
|
99
|
-
"captures": {
|
|
164
|
+
"captures": {
|
|
165
|
+
"1": {
|
|
166
|
+
"name": "entity.name.tag.class.coffeehaml"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
100
169
|
},
|
|
101
170
|
{
|
|
102
|
-
"name": "entity.
|
|
171
|
+
"name": "entity.name.tag.id.coffeehaml",
|
|
103
172
|
"match": "#([\\w-]+)",
|
|
104
|
-
"captures": {
|
|
173
|
+
"captures": {
|
|
174
|
+
"1": {
|
|
175
|
+
"name": "entity.name.tag.id.coffeehaml"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
105
178
|
}
|
|
106
179
|
]
|
|
107
180
|
},
|
|
108
|
-
|
|
109
181
|
"attribute-brace": {
|
|
110
182
|
"name": "meta.attribute.brace.coffeehaml",
|
|
111
183
|
"begin": "\\{",
|
|
112
|
-
"beginCaptures": {
|
|
184
|
+
"beginCaptures": {
|
|
185
|
+
"0": {
|
|
186
|
+
"name": "punctuation.definition.attributes.begin.coffeehaml"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
113
189
|
"end": "\\}",
|
|
114
|
-
"endCaptures": {
|
|
190
|
+
"endCaptures": {
|
|
191
|
+
"0": {
|
|
192
|
+
"name": "punctuation.definition.attributes.end.coffeehaml"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
115
195
|
"patterns": [
|
|
116
|
-
{
|
|
117
|
-
|
|
196
|
+
{
|
|
197
|
+
"include": "#attribute-content"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"contentName": "source.coffee.embedded.haml"
|
|
118
201
|
},
|
|
119
|
-
|
|
120
202
|
"attribute-paren": {
|
|
121
203
|
"name": "meta.attribute.paren.coffeehaml",
|
|
122
204
|
"begin": "\\(",
|
|
123
|
-
"beginCaptures": {
|
|
205
|
+
"beginCaptures": {
|
|
206
|
+
"0": {
|
|
207
|
+
"name": "punctuation.definition.attributes.begin.coffeehaml"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
124
210
|
"end": "\\)",
|
|
125
|
-
"endCaptures": {
|
|
211
|
+
"endCaptures": {
|
|
212
|
+
"0": {
|
|
213
|
+
"name": "punctuation.definition.attributes.end.coffeehaml"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
126
216
|
"patterns": [
|
|
127
|
-
{
|
|
128
|
-
|
|
217
|
+
{
|
|
218
|
+
"include": "#attribute-content"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"contentName": "source.coffee.embedded.haml"
|
|
129
222
|
},
|
|
130
|
-
|
|
131
223
|
"attribute-content": {
|
|
132
224
|
"patterns": [
|
|
133
225
|
{
|
|
@@ -143,115 +235,130 @@
|
|
|
143
235
|
"include": "#attribute-shorthand"
|
|
144
236
|
},
|
|
145
237
|
{
|
|
146
|
-
"include": "
|
|
238
|
+
"include": "source.coffee"
|
|
147
239
|
}
|
|
148
240
|
]
|
|
149
241
|
},
|
|
150
|
-
|
|
151
242
|
"spread-jsx": {
|
|
152
243
|
"name": "meta.spread.jsx.coffeehaml",
|
|
153
244
|
"match": "(\\.\\.\\.)\\s*([\\w$]+)",
|
|
154
245
|
"captures": {
|
|
155
|
-
"1": {
|
|
156
|
-
|
|
246
|
+
"1": {
|
|
247
|
+
"name": "keyword.operator.spread.coffeehaml"
|
|
248
|
+
},
|
|
249
|
+
"2": {
|
|
250
|
+
"name": "variable.other.spread.coffeehaml"
|
|
251
|
+
}
|
|
157
252
|
}
|
|
158
253
|
},
|
|
159
|
-
|
|
160
254
|
"spread-coffee": {
|
|
161
255
|
"name": "meta.spread.coffee.coffeehaml",
|
|
162
256
|
"match": "([\\w$]+)(\\.\\.\\.)",
|
|
163
257
|
"captures": {
|
|
164
|
-
"1": {
|
|
165
|
-
|
|
258
|
+
"1": {
|
|
259
|
+
"name": "variable.other.spread.coffeehaml"
|
|
260
|
+
},
|
|
261
|
+
"2": {
|
|
262
|
+
"name": "keyword.operator.spread.coffeehaml"
|
|
263
|
+
}
|
|
166
264
|
}
|
|
167
265
|
},
|
|
168
|
-
|
|
169
266
|
"attribute-pair": {
|
|
170
267
|
"name": "meta.attribute.pair.coffeehaml",
|
|
171
268
|
"match": "([\\w_-]+|\"[^\"]*\"|'[^']*')\\s*(:)(?!:)\\s*",
|
|
172
269
|
"captures": {
|
|
173
|
-
"1": {
|
|
174
|
-
|
|
270
|
+
"1": {
|
|
271
|
+
"name": "entity.other.attribute-name.coffeehaml"
|
|
272
|
+
},
|
|
273
|
+
"2": {
|
|
274
|
+
"name": "keyword.operator.assignment.coffeehaml"
|
|
275
|
+
}
|
|
175
276
|
}
|
|
176
277
|
},
|
|
177
|
-
|
|
178
278
|
"attribute-shorthand": {
|
|
179
279
|
"name": "meta.attribute.shorthand.coffeehaml",
|
|
180
280
|
"match": "(?<=[\\{,])[\\s]*([\\w$]+)(?=[,\\}])",
|
|
181
281
|
"captures": {
|
|
182
|
-
"1": {
|
|
282
|
+
"1": {
|
|
283
|
+
"name": "variable.other.shorthand.coffeehaml"
|
|
284
|
+
}
|
|
183
285
|
}
|
|
184
286
|
},
|
|
185
|
-
|
|
186
287
|
"control-flow": {
|
|
187
288
|
"name": "meta.control.coffeehaml",
|
|
188
289
|
"begin": "^(\\s*)(-)\\s*",
|
|
189
290
|
"beginCaptures": {
|
|
190
|
-
"2": {
|
|
291
|
+
"2": {
|
|
292
|
+
"name": "punctuation.definition.control.coffeehaml"
|
|
293
|
+
}
|
|
191
294
|
},
|
|
192
295
|
"end": "$",
|
|
193
296
|
"patterns": [
|
|
194
297
|
{
|
|
195
|
-
"
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
"name": "keyword.control.loop.coffeehaml",
|
|
200
|
-
"match": "\\b(for|while|do)\\b"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"name": "keyword.control.flow.coffeehaml",
|
|
204
|
-
"match": "\\b(else|then|when|by|of|in)\\b"
|
|
205
|
-
},
|
|
206
|
-
{ "include": "#coffeescript-expression" }
|
|
207
|
-
]
|
|
298
|
+
"include": "source.coffee"
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
"contentName": "source.coffee.embedded.haml"
|
|
208
302
|
},
|
|
209
|
-
|
|
210
303
|
"output": {
|
|
211
304
|
"name": "meta.output.coffeehaml",
|
|
212
305
|
"begin": "^(\\s*)(!=|=)(?!=)(\\s*)",
|
|
213
306
|
"beginCaptures": {
|
|
214
|
-
"2": {
|
|
307
|
+
"2": {
|
|
308
|
+
"name": "keyword.operator.output.coffeehaml"
|
|
309
|
+
}
|
|
215
310
|
},
|
|
216
311
|
"end": "$",
|
|
217
312
|
"patterns": [
|
|
218
|
-
{
|
|
219
|
-
|
|
313
|
+
{
|
|
314
|
+
"include": "source.coffee"
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"contentName": "source.coffee.embedded.haml"
|
|
220
318
|
},
|
|
221
|
-
|
|
222
319
|
"inline-output": {
|
|
223
320
|
"name": "meta.output.inline.coffeehaml",
|
|
224
321
|
"begin": "(!=|=)(?!=)\\s*",
|
|
225
322
|
"beginCaptures": {
|
|
226
|
-
"1": {
|
|
323
|
+
"1": {
|
|
324
|
+
"name": "keyword.operator.output.coffeehaml"
|
|
325
|
+
}
|
|
227
326
|
},
|
|
228
327
|
"end": "$",
|
|
229
328
|
"patterns": [
|
|
230
|
-
{
|
|
231
|
-
|
|
329
|
+
{
|
|
330
|
+
"include": "source.coffee"
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"contentName": "source.coffee.embedded.haml"
|
|
232
334
|
},
|
|
233
|
-
|
|
234
335
|
"filter": {
|
|
235
336
|
"name": "meta.filter.coffeehaml",
|
|
236
337
|
"begin": "^(\\s*)(:)([\\w-]+)",
|
|
237
338
|
"beginCaptures": {
|
|
238
|
-
"2": {
|
|
239
|
-
|
|
339
|
+
"2": {
|
|
340
|
+
"name": "punctuation.definition.filter.coffeehaml"
|
|
341
|
+
},
|
|
342
|
+
"3": {
|
|
343
|
+
"name": "entity.name.filter.coffeehaml"
|
|
344
|
+
}
|
|
240
345
|
},
|
|
241
346
|
"end": "$",
|
|
242
347
|
"patterns": [
|
|
243
|
-
{
|
|
348
|
+
{
|
|
349
|
+
"include": "#inline-text"
|
|
350
|
+
}
|
|
244
351
|
]
|
|
245
352
|
},
|
|
246
|
-
|
|
247
353
|
"text": {
|
|
248
354
|
"name": "text.plain.coffeehaml",
|
|
249
355
|
"match": "^(\\s*)(\\S.*)$",
|
|
250
356
|
"captures": {
|
|
251
|
-
"2": {
|
|
357
|
+
"2": {
|
|
358
|
+
"name": "text.plain.coffeehaml"
|
|
359
|
+
}
|
|
252
360
|
}
|
|
253
361
|
},
|
|
254
|
-
|
|
255
362
|
"inline-text": {
|
|
256
363
|
"patterns": [
|
|
257
364
|
{
|
|
@@ -260,166 +367,250 @@
|
|
|
260
367
|
}
|
|
261
368
|
]
|
|
262
369
|
},
|
|
263
|
-
|
|
264
370
|
"coffeescript-expression": {
|
|
265
371
|
"patterns": [
|
|
266
|
-
{
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
{ "include": "#coffee-string-heredoc" },
|
|
270
|
-
{ "include": "#coffee-regex" },
|
|
271
|
-
{ "include": "#coffee-function" },
|
|
272
|
-
{ "include": "#coffee-interpolation" },
|
|
273
|
-
{ "include": "#coffee-number" },
|
|
274
|
-
{ "include": "#coffee-boolean" },
|
|
275
|
-
{ "include": "#coffee-null" },
|
|
276
|
-
{ "include": "#coffee-operator" },
|
|
277
|
-
{ "include": "#coffee-comment" },
|
|
278
|
-
{ "include": "#coffee-bracket" },
|
|
279
|
-
{ "include": "#coffee-splat" },
|
|
280
|
-
{ "include": "#coffee-variable" }
|
|
372
|
+
{
|
|
373
|
+
"include": "source.coffee"
|
|
374
|
+
}
|
|
281
375
|
]
|
|
282
376
|
},
|
|
283
|
-
|
|
284
377
|
"coffee-string-double": {
|
|
285
378
|
"name": "string.quoted.double.coffeehaml",
|
|
286
379
|
"begin": "\"",
|
|
287
|
-
"beginCaptures": {
|
|
380
|
+
"beginCaptures": {
|
|
381
|
+
"0": {
|
|
382
|
+
"name": "punctuation.definition.string.begin.coffeehaml"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
288
385
|
"end": "\"",
|
|
289
|
-
"endCaptures": {
|
|
386
|
+
"endCaptures": {
|
|
387
|
+
"0": {
|
|
388
|
+
"name": "punctuation.definition.string.end.coffeehaml"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
290
391
|
"patterns": [
|
|
291
|
-
{
|
|
292
|
-
|
|
392
|
+
{
|
|
393
|
+
"include": "#coffee-interpolation"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "constant.character.escape.coffeehaml",
|
|
397
|
+
"match": "\\\\."
|
|
398
|
+
}
|
|
293
399
|
]
|
|
294
400
|
},
|
|
295
|
-
|
|
296
401
|
"coffee-string-single": {
|
|
297
402
|
"name": "string.quoted.single.coffeehaml",
|
|
298
403
|
"begin": "'",
|
|
299
|
-
"beginCaptures": {
|
|
404
|
+
"beginCaptures": {
|
|
405
|
+
"0": {
|
|
406
|
+
"name": "punctuation.definition.string.begin.coffeehaml"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
300
409
|
"end": "'",
|
|
301
|
-
"endCaptures": {
|
|
410
|
+
"endCaptures": {
|
|
411
|
+
"0": {
|
|
412
|
+
"name": "punctuation.definition.string.end.coffeehaml"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
302
415
|
"patterns": [
|
|
303
|
-
{
|
|
416
|
+
{
|
|
417
|
+
"name": "constant.character.escape.coffeehaml",
|
|
418
|
+
"match": "\\\\."
|
|
419
|
+
}
|
|
304
420
|
]
|
|
305
421
|
},
|
|
306
|
-
|
|
307
422
|
"coffee-string-template": {
|
|
308
423
|
"name": "string.quoted.template.coffeehaml",
|
|
309
424
|
"begin": "`",
|
|
310
|
-
"beginCaptures": {
|
|
425
|
+
"beginCaptures": {
|
|
426
|
+
"0": {
|
|
427
|
+
"name": "punctuation.definition.string.begin.coffeehaml"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
311
430
|
"end": "`",
|
|
312
|
-
"endCaptures": {
|
|
431
|
+
"endCaptures": {
|
|
432
|
+
"0": {
|
|
433
|
+
"name": "punctuation.definition.string.end.coffeehaml"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
313
436
|
"patterns": [
|
|
314
|
-
{
|
|
315
|
-
|
|
437
|
+
{
|
|
438
|
+
"include": "#coffee-interpolation"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "constant.character.escape.coffeehaml",
|
|
442
|
+
"match": "\\\\."
|
|
443
|
+
}
|
|
316
444
|
]
|
|
317
445
|
},
|
|
318
|
-
|
|
319
446
|
"coffee-string-heredoc": {
|
|
320
447
|
"name": "string.quoted.heredoc.coffeehaml",
|
|
321
448
|
"begin": "(\"\"\"|''')",
|
|
322
|
-
"beginCaptures": {
|
|
449
|
+
"beginCaptures": {
|
|
450
|
+
"0": {
|
|
451
|
+
"name": "punctuation.definition.string.begin.coffeehaml"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
323
454
|
"end": "\\1",
|
|
324
|
-
"endCaptures": {
|
|
455
|
+
"endCaptures": {
|
|
456
|
+
"0": {
|
|
457
|
+
"name": "punctuation.definition.string.end.coffeehaml"
|
|
458
|
+
}
|
|
459
|
+
},
|
|
325
460
|
"patterns": [
|
|
326
|
-
{
|
|
461
|
+
{
|
|
462
|
+
"include": "#coffee-interpolation"
|
|
463
|
+
}
|
|
327
464
|
]
|
|
328
465
|
},
|
|
329
|
-
|
|
330
466
|
"coffee-regex": {
|
|
331
467
|
"name": "string.regexp.coffeehaml",
|
|
332
468
|
"begin": "(?<=[=:(\\[,!&|?:;,\\{\\(])\\s*(/{1,3})(?![/*])",
|
|
333
|
-
"beginCaptures": {
|
|
469
|
+
"beginCaptures": {
|
|
470
|
+
"2": {
|
|
471
|
+
"name": "punctuation.definition.string.regexp.begin.coffeehaml"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
334
474
|
"end": "\\2[gimuy]*",
|
|
335
|
-
"endCaptures": {
|
|
475
|
+
"endCaptures": {
|
|
476
|
+
"0": {
|
|
477
|
+
"name": "punctuation.definition.string.regexp.end.coffeehaml"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
336
480
|
"patterns": [
|
|
337
|
-
{
|
|
481
|
+
{
|
|
482
|
+
"name": "constant.character.escape.regexp.coffeehaml",
|
|
483
|
+
"match": "\\\\."
|
|
484
|
+
}
|
|
338
485
|
]
|
|
339
486
|
},
|
|
340
|
-
|
|
341
487
|
"coffee-function": {
|
|
342
488
|
"name": "meta.function.arrow.coffeehaml",
|
|
343
489
|
"match": "(->|=>)|\\b(function)\\b",
|
|
344
490
|
"captures": {
|
|
345
|
-
"1": {
|
|
346
|
-
|
|
491
|
+
"1": {
|
|
492
|
+
"name": "storage.type.function.arrow.coffeehaml"
|
|
493
|
+
},
|
|
494
|
+
"2": {
|
|
495
|
+
"name": "storage.type.function.coffeehaml"
|
|
496
|
+
}
|
|
347
497
|
}
|
|
348
498
|
},
|
|
349
|
-
|
|
350
499
|
"coffee-interpolation": {
|
|
351
500
|
"name": "meta.embedded.interpolation.coffeehaml",
|
|
352
501
|
"begin": "#\\{",
|
|
353
|
-
"beginCaptures": {
|
|
502
|
+
"beginCaptures": {
|
|
503
|
+
"0": {
|
|
504
|
+
"name": "punctuation.definition.interpolation.begin.coffeehaml"
|
|
505
|
+
}
|
|
506
|
+
},
|
|
354
507
|
"end": "\\}",
|
|
355
|
-
"endCaptures": {
|
|
508
|
+
"endCaptures": {
|
|
509
|
+
"0": {
|
|
510
|
+
"name": "punctuation.definition.interpolation.end.coffeehaml"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
356
513
|
"patterns": [
|
|
357
|
-
{
|
|
514
|
+
{
|
|
515
|
+
"include": "#coffeescript-expression"
|
|
516
|
+
}
|
|
358
517
|
]
|
|
359
518
|
},
|
|
360
|
-
|
|
361
519
|
"coffee-number": {
|
|
362
520
|
"name": "constant.numeric.coffeehaml",
|
|
363
521
|
"match": "\\b(0[xX][0-9a-fA-F]+|0[oO]?[0-7]+|0[bB][01]+|(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?)\\b"
|
|
364
522
|
},
|
|
365
|
-
|
|
366
523
|
"coffee-boolean": {
|
|
367
524
|
"name": "constant.language.boolean.coffeehaml",
|
|
368
525
|
"match": "\\b(true|false|yes|no|on|off)\\b"
|
|
369
526
|
},
|
|
370
|
-
|
|
371
527
|
"coffee-null": {
|
|
372
528
|
"name": "constant.language.null.coffeehaml",
|
|
373
529
|
"match": "\\b(null|undefined|this|Infinity|NaN)\\b"
|
|
374
530
|
},
|
|
375
|
-
|
|
376
531
|
"coffee-operator": {
|
|
377
532
|
"name": "keyword.operator.coffeehaml",
|
|
378
|
-
"match": "\\b(and|or|not|is|isnt|instanceof|typeof|new|delete|of|in|then|when|do|by|own|unless|loop|break|continue|return|yield|await|throw|try|catch|finally|class|extends|super
|
|
533
|
+
"match": "\\b(and|or|not|is|isnt|instanceof|typeof|new|delete|of|in|then|when|do|by|own|unless|loop|break|continue|return|yield|await|throw|try|catch|finally|class|extends|super)\\b|(\\?\\?|\\.\\.\\.|\\?\\=|\\.\\.|\\?\\.?|:{2,3}|\\|\\||&&|[<>=!]==?|[-+*/%&|^~]=?|[<>=!]=|[-+*/%&|^~<>]=?)"
|
|
379
534
|
},
|
|
380
|
-
|
|
381
535
|
"coffee-bracket": {
|
|
382
536
|
"patterns": [
|
|
383
537
|
{
|
|
384
538
|
"name": "meta.brace.curly.coffeehaml",
|
|
385
539
|
"begin": "\\{",
|
|
386
|
-
"beginCaptures": {
|
|
540
|
+
"beginCaptures": {
|
|
541
|
+
"0": {
|
|
542
|
+
"name": "punctuation.definition.bracket.curly.begin.coffeehaml"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
387
545
|
"end": "\\}",
|
|
388
|
-
"endCaptures": {
|
|
389
|
-
|
|
546
|
+
"endCaptures": {
|
|
547
|
+
"0": {
|
|
548
|
+
"name": "punctuation.definition.bracket.curly.end.coffeehaml"
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"patterns": [
|
|
552
|
+
{
|
|
553
|
+
"include": "source.coffee"
|
|
554
|
+
}
|
|
555
|
+
]
|
|
390
556
|
},
|
|
391
557
|
{
|
|
392
558
|
"name": "meta.brace.round.coffeehaml",
|
|
393
559
|
"begin": "\\(",
|
|
394
|
-
"beginCaptures": {
|
|
560
|
+
"beginCaptures": {
|
|
561
|
+
"0": {
|
|
562
|
+
"name": "punctuation.definition.bracket.round.begin.coffeehaml"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
395
565
|
"end": "\\)",
|
|
396
|
-
"endCaptures": {
|
|
397
|
-
|
|
566
|
+
"endCaptures": {
|
|
567
|
+
"0": {
|
|
568
|
+
"name": "punctuation.definition.bracket.round.end.coffeehaml"
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"patterns": [
|
|
572
|
+
{
|
|
573
|
+
"include": "source.coffee"
|
|
574
|
+
}
|
|
575
|
+
]
|
|
398
576
|
},
|
|
399
577
|
{
|
|
400
578
|
"name": "meta.brace.square.coffeehaml",
|
|
401
579
|
"begin": "\\[",
|
|
402
|
-
"beginCaptures": {
|
|
580
|
+
"beginCaptures": {
|
|
581
|
+
"0": {
|
|
582
|
+
"name": "punctuation.definition.bracket.square.begin.coffeehaml"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
403
585
|
"end": "\\]",
|
|
404
|
-
"endCaptures": {
|
|
405
|
-
|
|
586
|
+
"endCaptures": {
|
|
587
|
+
"0": {
|
|
588
|
+
"name": "punctuation.definition.bracket.square.end.coffeehaml"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"patterns": [
|
|
592
|
+
{
|
|
593
|
+
"include": "source.coffee"
|
|
594
|
+
}
|
|
595
|
+
]
|
|
406
596
|
}
|
|
407
597
|
]
|
|
408
598
|
},
|
|
409
|
-
|
|
410
599
|
"coffee-splat": {
|
|
411
600
|
"name": "keyword.operator.spread.coffeehaml",
|
|
412
601
|
"match": "\\.\\.\\."
|
|
413
602
|
},
|
|
414
|
-
|
|
603
|
+
"coffee-import-keyword": {
|
|
604
|
+
"name": "keyword.control.import.coffeehaml",
|
|
605
|
+
"match": "\\b(import|export|default|from|as|type)\\b(?!\\s*[=:])"
|
|
606
|
+
},
|
|
415
607
|
"coffee-variable": {
|
|
416
608
|
"name": "variable.other.coffeehaml",
|
|
417
609
|
"match": "\\b([a-zA-Z_$][\\w$]*)\\b"
|
|
418
610
|
},
|
|
419
|
-
|
|
420
611
|
"coffee-comment": {
|
|
421
612
|
"name": "comment.line.number-sign.coffeehaml",
|
|
422
613
|
"match": "#(?![\\{@]).*$"
|
|
423
614
|
}
|
|
424
615
|
}
|
|
425
|
-
}
|
|
616
|
+
}
|