tree-sitter-kdl 1.0.3 → 2.0.0

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.
Files changed (39) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -2
  3. package/binding.gyp +22 -6
  4. package/bindings/node/binding.cc +12 -23
  5. package/bindings/node/index.d.ts +60 -0
  6. package/bindings/node/index.js +33 -15
  7. package/grammar.js +193 -170
  8. package/package.json +48 -31
  9. package/prebuilds/darwin-arm64/tree-sitter-kdl.node +0 -0
  10. package/prebuilds/darwin-x64/tree-sitter-kdl.node +0 -0
  11. package/prebuilds/linux-arm64/tree-sitter-kdl.node +0 -0
  12. package/prebuilds/linux-x64/tree-sitter-kdl.node +0 -0
  13. package/prebuilds/win32-arm64/tree-sitter-kdl.node +0 -0
  14. package/prebuilds/win32-x64/tree-sitter-kdl.node +0 -0
  15. package/queries/highlights.scm +37 -17
  16. package/queries/indents.scm +1 -1
  17. package/queries/injections.scm +10 -0
  18. package/queries/locals.scm +3 -3
  19. package/src/grammar.json +744 -761
  20. package/src/node-types.json +271 -238
  21. package/src/parser.c +12895 -11901
  22. package/src/scanner.c +161 -53
  23. package/src/tree_sitter/alloc.h +54 -0
  24. package/src/tree_sitter/array.h +336 -0
  25. package/src/tree_sitter/parser.h +79 -17
  26. package/tree-sitter-kdl.wasm +0 -0
  27. package/tree-sitter.json +44 -0
  28. package/.eslintrc.js +0 -20
  29. package/.gitattributes +0 -7
  30. package/.github/workflows/ci.yml +0 -34
  31. package/.github/workflows/fuzz.yml +0 -21
  32. package/.github/workflows/lint.yml +0 -19
  33. package/.github/workflows/publish.yml +0 -51
  34. package/Cargo.toml +0 -27
  35. package/Package.swift +0 -38
  36. package/bindings/rust/README.md +0 -36
  37. package/bindings/rust/build.rs +0 -19
  38. package/bindings/rust/lib.rs +0 -68
  39. package/bindings/swift/kdl.h +0 -16
package/src/grammar.json CHANGED
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
2
3
  "name": "kdl",
3
4
  "word": "_normal_bare_identifier",
4
5
  "rules": {
@@ -6,42 +7,27 @@
6
7
  "type": "SEQ",
7
8
  "members": [
8
9
  {
9
- "type": "REPEAT",
10
- "content": {
11
- "type": "SYMBOL",
12
- "name": "_linespace"
13
- }
10
+ "type": "CHOICE",
11
+ "members": [
12
+ {
13
+ "type": "SYMBOL",
14
+ "name": "_bom"
15
+ },
16
+ {
17
+ "type": "BLANK"
18
+ }
19
+ ]
14
20
  },
15
21
  {
16
22
  "type": "CHOICE",
17
23
  "members": [
18
24
  {
19
- "type": "SEQ",
20
- "members": [
21
- {
22
- "type": "SYMBOL",
23
- "name": "node"
24
- },
25
- {
26
- "type": "REPEAT",
27
- "content": {
28
- "type": "SEQ",
29
- "members": [
30
- {
31
- "type": "REPEAT",
32
- "content": {
33
- "type": "SYMBOL",
34
- "name": "_linespace"
35
- }
36
- },
37
- {
38
- "type": "SYMBOL",
39
- "name": "node"
40
- }
41
- ]
42
- }
43
- }
44
- ]
25
+ "type": "FIELD",
26
+ "name": "version",
27
+ "content": {
28
+ "type": "SYMBOL",
29
+ "name": "version"
30
+ }
45
31
  },
46
32
  {
47
33
  "type": "BLANK"
@@ -49,187 +35,143 @@
49
35
  ]
50
36
  },
51
37
  {
52
- "type": "REPEAT",
53
- "content": {
54
- "type": "SYMBOL",
55
- "name": "_linespace"
56
- }
38
+ "type": "SEQ",
39
+ "members": [
40
+ {
41
+ "type": "REPEAT",
42
+ "content": {
43
+ "type": "SYMBOL",
44
+ "name": "_linespace"
45
+ }
46
+ },
47
+ {
48
+ "type": "REPEAT",
49
+ "content": {
50
+ "type": "SEQ",
51
+ "members": [
52
+ {
53
+ "type": "SYMBOL",
54
+ "name": "node"
55
+ },
56
+ {
57
+ "type": "REPEAT",
58
+ "content": {
59
+ "type": "SYMBOL",
60
+ "name": "_linespace"
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ }
66
+ ]
57
67
  }
58
68
  ]
59
69
  },
60
- "node": {
70
+ "version": {
61
71
  "type": "PREC",
62
- "value": 1,
72
+ "value": 2,
63
73
  "content": {
64
74
  "type": "SEQ",
65
75
  "members": [
66
76
  {
67
- "type": "ALIAS",
77
+ "type": "STRING",
78
+ "value": "/-"
79
+ },
80
+ {
81
+ "type": "REPEAT",
68
82
  "content": {
69
- "type": "CHOICE",
70
- "members": [
71
- {
72
- "type": "SEQ",
73
- "members": [
74
- {
75
- "type": "STRING",
76
- "value": "/-"
77
- },
78
- {
79
- "type": "REPEAT",
80
- "content": {
81
- "type": "SYMBOL",
82
- "name": "_node_space"
83
- }
84
- }
85
- ]
86
- },
87
- {
88
- "type": "BLANK"
89
- }
90
- ]
91
- },
92
- "named": true,
93
- "value": "node_comment"
83
+ "type": "SYMBOL",
84
+ "name": "_unicode_space"
85
+ }
94
86
  },
95
87
  {
96
- "type": "CHOICE",
97
- "members": [
98
- {
99
- "type": "SYMBOL",
100
- "name": "type"
101
- },
102
- {
103
- "type": "BLANK"
104
- }
105
- ]
88
+ "type": "STRING",
89
+ "value": "kdl-version"
106
90
  },
107
91
  {
108
- "type": "SYMBOL",
109
- "name": "identifier"
92
+ "type": "REPEAT1",
93
+ "content": {
94
+ "type": "SYMBOL",
95
+ "name": "_unicode_space"
96
+ }
110
97
  },
111
98
  {
112
- "type": "REPEAT",
99
+ "type": "FIELD",
100
+ "name": "version",
113
101
  "content": {
114
- "type": "SEQ",
102
+ "type": "CHOICE",
115
103
  "members": [
116
104
  {
117
- "type": "REPEAT1",
118
- "content": {
119
- "type": "SYMBOL",
120
- "name": "_node_space"
121
- }
105
+ "type": "STRING",
106
+ "value": "1"
122
107
  },
123
108
  {
124
- "type": "SYMBOL",
125
- "name": "node_field"
109
+ "type": "STRING",
110
+ "value": "2"
126
111
  }
127
112
  ]
128
113
  }
129
114
  },
130
- {
131
- "type": "CHOICE",
132
- "members": [
133
- {
134
- "type": "SEQ",
135
- "members": [
136
- {
137
- "type": "REPEAT",
138
- "content": {
139
- "type": "SYMBOL",
140
- "name": "_node_space"
141
- }
142
- },
143
- {
144
- "type": "FIELD",
145
- "name": "children",
146
- "content": {
147
- "type": "SYMBOL",
148
- "name": "node_children"
149
- }
150
- },
151
- {
152
- "type": "REPEAT",
153
- "content": {
154
- "type": "SYMBOL",
155
- "name": "_ws"
156
- }
157
- }
158
- ]
159
- },
160
- {
161
- "type": "BLANK"
162
- }
163
- ]
164
- },
165
115
  {
166
116
  "type": "REPEAT",
167
117
  "content": {
168
118
  "type": "SYMBOL",
169
- "name": "_node_space"
119
+ "name": "_unicode_space"
170
120
  }
171
121
  },
172
122
  {
173
123
  "type": "SYMBOL",
174
- "name": "_node_terminator"
124
+ "name": "_newline"
175
125
  }
176
126
  ]
177
127
  }
178
128
  },
179
- "node_field": {
180
- "type": "CHOICE",
129
+ "node": {
130
+ "type": "SEQ",
181
131
  "members": [
182
132
  {
183
133
  "type": "SYMBOL",
184
- "name": "_node_field_comment"
134
+ "name": "_base_node"
185
135
  },
186
136
  {
187
137
  "type": "SYMBOL",
188
- "name": "_node_field"
138
+ "name": "_node_terminator"
189
139
  }
190
140
  ]
191
141
  },
192
- "_node_field_comment": {
193
- "type": "ALIAS",
194
- "content": {
195
- "type": "SEQ",
196
- "members": [
197
- {
198
- "type": "STRING",
199
- "value": "/-"
200
- },
201
- {
202
- "type": "REPEAT",
203
- "content": {
204
- "type": "SYMBOL",
205
- "name": "_node_space"
206
- }
207
- },
208
- {
209
- "type": "SYMBOL",
210
- "name": "_node_field"
211
- }
212
- ]
213
- },
214
- "named": true,
215
- "value": "node_field_comment"
216
- },
217
- "_node_field": {
218
- "type": "CHOICE",
142
+ "_final_node": {
143
+ "type": "SEQ",
219
144
  "members": [
220
145
  {
221
- "type": "SYMBOL",
222
- "name": "prop"
146
+ "type": "ALIAS",
147
+ "content": {
148
+ "type": "SYMBOL",
149
+ "name": "_base_node"
150
+ },
151
+ "named": true,
152
+ "value": "node"
223
153
  },
224
154
  {
225
- "type": "SYMBOL",
226
- "name": "value"
155
+ "type": "STRING",
156
+ "value": "}"
227
157
  }
228
158
  ]
229
159
  },
230
- "node_children": {
160
+ "_base_node": {
231
161
  "type": "SEQ",
232
162
  "members": [
163
+ {
164
+ "type": "CHOICE",
165
+ "members": [
166
+ {
167
+ "type": "SYMBOL",
168
+ "name": "node_comment"
169
+ },
170
+ {
171
+ "type": "BLANK"
172
+ }
173
+ ]
174
+ },
233
175
  {
234
176
  "type": "CHOICE",
235
177
  "members": [
@@ -237,13 +179,12 @@
237
179
  "type": "SEQ",
238
180
  "members": [
239
181
  {
240
- "type": "ALIAS",
182
+ "type": "FIELD",
183
+ "name": "type",
241
184
  "content": {
242
- "type": "STRING",
243
- "value": "/-"
244
- },
245
- "named": true,
246
- "value": "node_children_comment"
185
+ "type": "SYMBOL",
186
+ "name": "type"
187
+ }
247
188
  },
248
189
  {
249
190
  "type": "REPEAT",
@@ -260,8 +201,19 @@
260
201
  ]
261
202
  },
262
203
  {
263
- "type": "STRING",
264
- "value": "{"
204
+ "type": "FIELD",
205
+ "name": "name",
206
+ "content": {
207
+ "type": "SYMBOL",
208
+ "name": "identifier"
209
+ }
210
+ },
211
+ {
212
+ "type": "REPEAT",
213
+ "content": {
214
+ "type": "SYMBOL",
215
+ "name": "node_field"
216
+ }
265
217
  },
266
218
  {
267
219
  "type": "SEQ",
@@ -269,8 +221,24 @@
269
221
  {
270
222
  "type": "REPEAT",
271
223
  "content": {
272
- "type": "SYMBOL",
273
- "name": "_linespace"
224
+ "type": "SEQ",
225
+ "members": [
226
+ {
227
+ "type": "REPEAT",
228
+ "content": {
229
+ "type": "SYMBOL",
230
+ "name": "_node_space"
231
+ }
232
+ },
233
+ {
234
+ "type": "FIELD",
235
+ "name": "children",
236
+ "content": {
237
+ "type": "SYMBOL",
238
+ "name": "node_children_comment"
239
+ }
240
+ }
241
+ ]
274
242
  }
275
243
  },
276
244
  {
@@ -280,8 +248,24 @@
280
248
  "type": "SEQ",
281
249
  "members": [
282
250
  {
283
- "type": "SYMBOL",
284
- "name": "node"
251
+ "type": "SEQ",
252
+ "members": [
253
+ {
254
+ "type": "REPEAT",
255
+ "content": {
256
+ "type": "SYMBOL",
257
+ "name": "_node_space"
258
+ }
259
+ },
260
+ {
261
+ "type": "FIELD",
262
+ "name": "children",
263
+ "content": {
264
+ "type": "SYMBOL",
265
+ "name": "node_children"
266
+ }
267
+ }
268
+ ]
285
269
  },
286
270
  {
287
271
  "type": "REPEAT",
@@ -292,12 +276,16 @@
292
276
  "type": "REPEAT",
293
277
  "content": {
294
278
  "type": "SYMBOL",
295
- "name": "_linespace"
279
+ "name": "_node_space"
296
280
  }
297
281
  },
298
282
  {
299
- "type": "SYMBOL",
300
- "name": "node"
283
+ "type": "FIELD",
284
+ "name": "children",
285
+ "content": {
286
+ "type": "SYMBOL",
287
+ "name": "node_children_comment"
288
+ }
301
289
  }
302
290
  ]
303
291
  }
@@ -308,54 +296,180 @@
308
296
  "type": "BLANK"
309
297
  }
310
298
  ]
311
- },
312
- {
313
- "type": "REPEAT",
314
- "content": {
315
- "type": "SYMBOL",
316
- "name": "_linespace"
317
- }
318
299
  }
319
300
  ]
320
301
  },
321
302
  {
322
- "type": "STRING",
323
- "value": "}"
303
+ "type": "REPEAT",
304
+ "content": {
305
+ "type": "SYMBOL",
306
+ "name": "_node_space"
307
+ }
324
308
  }
325
309
  ]
326
310
  },
327
- "_node_space": {
311
+ "node_field": {
328
312
  "type": "CHOICE",
329
313
  "members": [
330
314
  {
331
315
  "type": "SEQ",
332
316
  "members": [
333
317
  {
334
- "type": "REPEAT",
318
+ "type": "REPEAT1",
335
319
  "content": {
336
320
  "type": "SYMBOL",
337
- "name": "_ws"
321
+ "name": "_node_space"
338
322
  }
339
323
  },
340
324
  {
341
325
  "type": "SYMBOL",
342
- "name": "_escline"
343
- },
344
- {
326
+ "name": "_node_field"
327
+ }
328
+ ]
329
+ },
330
+ {
331
+ "type": "SEQ",
332
+ "members": [
333
+ {
345
334
  "type": "REPEAT",
346
335
  "content": {
347
336
  "type": "SYMBOL",
348
- "name": "_ws"
337
+ "name": "_node_space"
349
338
  }
339
+ },
340
+ {
341
+ "type": "SYMBOL",
342
+ "name": "node_field_comment"
350
343
  }
351
344
  ]
345
+ }
346
+ ]
347
+ },
348
+ "node_comment": {
349
+ "type": "SEQ",
350
+ "members": [
351
+ {
352
+ "type": "STRING",
353
+ "value": "/-"
352
354
  },
353
355
  {
354
- "type": "REPEAT1",
356
+ "type": "REPEAT",
355
357
  "content": {
356
358
  "type": "SYMBOL",
357
- "name": "_ws"
359
+ "name": "_linespace"
360
+ }
361
+ }
362
+ ]
363
+ },
364
+ "node_field_comment": {
365
+ "type": "SEQ",
366
+ "members": [
367
+ {
368
+ "type": "STRING",
369
+ "value": "/-"
370
+ },
371
+ {
372
+ "type": "REPEAT",
373
+ "content": {
374
+ "type": "SYMBOL",
375
+ "name": "_linespace"
376
+ }
377
+ },
378
+ {
379
+ "type": "SYMBOL",
380
+ "name": "_node_field"
381
+ }
382
+ ]
383
+ },
384
+ "_node_field": {
385
+ "type": "CHOICE",
386
+ "members": [
387
+ {
388
+ "type": "FIELD",
389
+ "name": "property",
390
+ "content": {
391
+ "type": "SYMBOL",
392
+ "name": "prop"
393
+ }
394
+ },
395
+ {
396
+ "type": "FIELD",
397
+ "name": "argument",
398
+ "content": {
399
+ "type": "SYMBOL",
400
+ "name": "value"
401
+ }
402
+ }
403
+ ]
404
+ },
405
+ "node_children_comment": {
406
+ "type": "SEQ",
407
+ "members": [
408
+ {
409
+ "type": "STRING",
410
+ "value": "/-"
411
+ },
412
+ {
413
+ "type": "REPEAT",
414
+ "content": {
415
+ "type": "SYMBOL",
416
+ "name": "_linespace"
417
+ }
418
+ },
419
+ {
420
+ "type": "SYMBOL",
421
+ "name": "node_children"
422
+ }
423
+ ]
424
+ },
425
+ "node_children": {
426
+ "type": "SEQ",
427
+ "members": [
428
+ {
429
+ "type": "STRING",
430
+ "value": "{"
431
+ },
432
+ {
433
+ "type": "REPEAT",
434
+ "content": {
435
+ "type": "CHOICE",
436
+ "members": [
437
+ {
438
+ "type": "SYMBOL",
439
+ "name": "_linespace"
440
+ },
441
+ {
442
+ "type": "SYMBOL",
443
+ "name": "node"
444
+ }
445
+ ]
358
446
  }
447
+ },
448
+ {
449
+ "type": "CHOICE",
450
+ "members": [
451
+ {
452
+ "type": "STRING",
453
+ "value": "}"
454
+ },
455
+ {
456
+ "type": "SYMBOL",
457
+ "name": "_final_node"
458
+ }
459
+ ]
460
+ }
461
+ ]
462
+ },
463
+ "_node_space": {
464
+ "type": "CHOICE",
465
+ "members": [
466
+ {
467
+ "type": "SYMBOL",
468
+ "name": "_ws"
469
+ },
470
+ {
471
+ "type": "SYMBOL",
472
+ "name": "_escline"
359
473
  }
360
474
  ]
361
475
  },
@@ -401,75 +515,23 @@
401
515
  "name": "_normal_bare_identifier"
402
516
  },
403
517
  {
404
- "type": "SEQ",
405
- "members": [
406
- {
407
- "type": "SYMBOL",
408
- "name": "_sign"
409
- },
410
- {
411
- "type": "CHOICE",
412
- "members": [
413
- {
414
- "type": "SEQ",
415
- "members": [
416
- {
417
- "type": "SYMBOL",
418
- "name": "__identifier_char_no_digit"
419
- },
420
- {
421
- "type": "REPEAT",
422
- "content": {
423
- "type": "SYMBOL",
424
- "name": "_identifier_char"
425
- }
426
- }
427
- ]
428
- },
429
- {
430
- "type": "BLANK"
431
- }
432
- ]
433
- }
434
- ]
518
+ "type": "SYMBOL",
519
+ "name": "_signed_bare_identifier"
435
520
  }
436
521
  ]
437
522
  },
438
523
  "_normal_bare_identifier": {
439
- "type": "TOKEN",
440
- "content": {
441
- "type": "SEQ",
442
- "members": [
443
- {
444
- "type": "PATTERN",
445
- "value": "[\\u4E00-\\u9FFF\\p{L}\\p{M}\\p{N}\\p{Emoji}_~!@#\\$%\\^&\\*.:'\\|\\?&&[^\\s\\d\\/(){}<>;\\[\\]=,\"]]"
446
- },
447
- {
448
- "type": "PATTERN",
449
- "value": "[\\u4E00-\\u9FFF\\p{L}\\p{M}\\p{N}\\p{Emoji}\\-_~!@#\\$%\\^&\\*.:'\\|\\?+&&[^\\s\\/(){}<>;\\[\\]=,\"]]*"
450
- }
451
- ]
452
- }
453
- },
454
- "_identifier_char": {
455
- "type": "TOKEN",
456
- "content": {
457
- "type": "PATTERN",
458
- "value": "[\\u4E00-\\u9FFF\\p{L}\\p{M}\\p{N}\\-_~!@#\\$%\\^&\\*.:'\\|\\?+&&[^\\s\\/(){}<>;\\[\\]=,\"]]"
459
- }
460
- },
461
- "__identifier_char_no_digit": {
462
524
  "type": "TOKEN",
463
525
  "content": {
464
526
  "type": "PATTERN",
465
- "value": "[\\u4E00-\\u9FFF\\p{L}\\p{M}\\p{N}\\-_~!@#\\$%\\^&\\*.:'\\|\\?+&&[^\\s\\d\\/(){}<>;\\[\\]=,\"]]"
527
+ "value": "[^\\u0009\\u0020\\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\r\\n\\u0085\\u000B\\u000C\\u2028\\u2029\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF\\\\\\/(){};\\[\\]\"=0-9+\\-][^\\u0009\\u0020\\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\r\\n\\u0085\\u000B\\u000C\\u2028\\u2029\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF\\\\\\/(){};\\[\\]\"=]*"
466
528
  }
467
529
  },
468
- "__identifier_char_no_digit_sign": {
530
+ "_signed_bare_identifier": {
469
531
  "type": "TOKEN",
470
532
  "content": {
471
533
  "type": "PATTERN",
472
- "value": "[\\u4E00-\\u9FFF\\p{L}\\p{M}\\p{N}\\-_~!@#\\$%\\^&\\*.:'\\|\\?&&[^\\s\\d\\+\\-\\/(){}<>;\\[\\]=,\"]]"
534
+ "value": "[+-](?:[^\\u0009\\u0020\\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\r\\n\\u0085\\u000B\\u000C\\u2028\\u2029\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF\\\\\\/(){};\\[\\]\"=0-9][^\\u0009\\u0020\\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\r\\n\\u0085\\u000B\\u000C\\u2028\\u2029\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF\\\\\\/(){};\\[\\]\"=]*)?"
473
535
  }
474
536
  },
475
537
  "keyword": {
@@ -480,190 +542,201 @@
480
542
  "name": "boolean"
481
543
  },
482
544
  {
483
- "type": "STRING",
484
- "value": "null"
545
+ "type": "TOKEN",
546
+ "content": {
547
+ "type": "PREC",
548
+ "value": 2,
549
+ "content": {
550
+ "type": "STRING",
551
+ "value": "null"
552
+ }
553
+ }
554
+ },
555
+ {
556
+ "type": "TOKEN",
557
+ "content": {
558
+ "type": "PREC",
559
+ "value": 2,
560
+ "content": {
561
+ "type": "STRING",
562
+ "value": "#null"
563
+ }
564
+ }
485
565
  }
486
566
  ]
487
567
  },
488
- "annotation_type": {
489
- "type": "CHOICE",
568
+ "prop": {
569
+ "type": "SEQ",
490
570
  "members": [
491
571
  {
492
- "type": "STRING",
493
- "value": "i8"
572
+ "type": "FIELD",
573
+ "name": "key",
574
+ "content": {
575
+ "type": "SYMBOL",
576
+ "name": "identifier"
577
+ }
494
578
  },
495
579
  {
496
- "type": "STRING",
497
- "value": "i16"
580
+ "type": "REPEAT",
581
+ "content": {
582
+ "type": "SYMBOL",
583
+ "name": "_node_space"
584
+ }
498
585
  },
499
586
  {
500
587
  "type": "STRING",
501
- "value": "i32"
588
+ "value": "="
502
589
  },
503
590
  {
504
- "type": "STRING",
505
- "value": "i64"
591
+ "type": "REPEAT",
592
+ "content": {
593
+ "type": "SYMBOL",
594
+ "name": "_node_space"
595
+ }
506
596
  },
507
597
  {
508
- "type": "STRING",
509
- "value": "u8"
510
- },
598
+ "type": "FIELD",
599
+ "name": "value",
600
+ "content": {
601
+ "type": "SYMBOL",
602
+ "name": "value"
603
+ }
604
+ }
605
+ ]
606
+ },
607
+ "value": {
608
+ "type": "SEQ",
609
+ "members": [
511
610
  {
512
- "type": "STRING",
513
- "value": "u16"
611
+ "type": "CHOICE",
612
+ "members": [
613
+ {
614
+ "type": "SEQ",
615
+ "members": [
616
+ {
617
+ "type": "FIELD",
618
+ "name": "type",
619
+ "content": {
620
+ "type": "SYMBOL",
621
+ "name": "type"
622
+ }
623
+ },
624
+ {
625
+ "type": "REPEAT",
626
+ "content": {
627
+ "type": "SYMBOL",
628
+ "name": "_node_space"
629
+ }
630
+ }
631
+ ]
632
+ },
633
+ {
634
+ "type": "BLANK"
635
+ }
636
+ ]
514
637
  },
638
+ {
639
+ "type": "FIELD",
640
+ "name": "value",
641
+ "content": {
642
+ "type": "CHOICE",
643
+ "members": [
644
+ {
645
+ "type": "SYMBOL",
646
+ "name": "string"
647
+ },
648
+ {
649
+ "type": "ALIAS",
650
+ "content": {
651
+ "type": "SYMBOL",
652
+ "name": "_bare_identifier"
653
+ },
654
+ "named": true,
655
+ "value": "string"
656
+ },
657
+ {
658
+ "type": "SYMBOL",
659
+ "name": "number"
660
+ },
661
+ {
662
+ "type": "SYMBOL",
663
+ "name": "keyword"
664
+ }
665
+ ]
666
+ }
667
+ }
668
+ ]
669
+ },
670
+ "type": {
671
+ "type": "SEQ",
672
+ "members": [
515
673
  {
516
674
  "type": "STRING",
517
- "value": "u32"
675
+ "value": "("
518
676
  },
519
677
  {
520
- "type": "STRING",
521
- "value": "u64"
522
- },
523
- {
524
- "type": "STRING",
525
- "value": "isize"
526
- },
527
- {
528
- "type": "STRING",
529
- "value": "usize"
530
- },
531
- {
532
- "type": "STRING",
533
- "value": "f32"
534
- },
535
- {
536
- "type": "STRING",
537
- "value": "f64"
538
- },
539
- {
540
- "type": "STRING",
541
- "value": "decimal64"
542
- },
543
- {
544
- "type": "STRING",
545
- "value": "decimal128"
546
- },
547
- {
548
- "type": "STRING",
549
- "value": "date-time"
550
- },
551
- {
552
- "type": "STRING",
553
- "value": "time"
554
- },
555
- {
556
- "type": "STRING",
557
- "value": "date"
558
- },
559
- {
560
- "type": "STRING",
561
- "value": "duration"
562
- },
563
- {
564
- "type": "STRING",
565
- "value": "decimal"
566
- },
567
- {
568
- "type": "STRING",
569
- "value": "currency"
570
- },
571
- {
572
- "type": "STRING",
573
- "value": "country-2"
574
- },
575
- {
576
- "type": "STRING",
577
- "value": "country-3"
578
- },
579
- {
580
- "type": "STRING",
581
- "value": "country-subdivision"
582
- },
583
- {
584
- "type": "STRING",
585
- "value": "email"
586
- },
587
- {
588
- "type": "STRING",
589
- "value": "idn-email"
590
- },
591
- {
592
- "type": "STRING",
593
- "value": "hostname"
594
- },
595
- {
596
- "type": "STRING",
597
- "value": "idn-hostname"
598
- },
599
- {
600
- "type": "STRING",
601
- "value": "ipv4"
602
- },
603
- {
604
- "type": "STRING",
605
- "value": "ipv6"
606
- },
607
- {
608
- "type": "STRING",
609
- "value": "url"
610
- },
611
- {
612
- "type": "STRING",
613
- "value": "url-reference"
614
- },
615
- {
616
- "type": "STRING",
617
- "value": "irl"
618
- },
619
- {
620
- "type": "STRING",
621
- "value": "iri-reference"
622
- },
623
- {
624
- "type": "STRING",
625
- "value": "url-template"
678
+ "type": "REPEAT",
679
+ "content": {
680
+ "type": "SYMBOL",
681
+ "name": "_node_space"
682
+ }
626
683
  },
627
684
  {
628
- "type": "STRING",
629
- "value": "uuid"
685
+ "type": "FIELD",
686
+ "name": "name",
687
+ "content": {
688
+ "type": "SYMBOL",
689
+ "name": "identifier"
690
+ }
630
691
  },
631
692
  {
632
- "type": "STRING",
633
- "value": "regex"
693
+ "type": "REPEAT",
694
+ "content": {
695
+ "type": "SYMBOL",
696
+ "name": "_node_space"
697
+ }
634
698
  },
635
699
  {
636
700
  "type": "STRING",
637
- "value": "base64"
701
+ "value": ")"
638
702
  }
639
703
  ]
640
704
  },
641
- "prop": {
642
- "type": "SEQ",
705
+ "string": {
706
+ "type": "CHOICE",
643
707
  "members": [
644
708
  {
645
709
  "type": "SYMBOL",
646
- "name": "identifier"
710
+ "name": "_raw_string"
647
711
  },
648
712
  {
649
- "type": "STRING",
650
- "value": "="
713
+ "type": "SYMBOL",
714
+ "name": "multi_line_string"
651
715
  },
652
716
  {
653
717
  "type": "SYMBOL",
654
- "name": "value"
718
+ "name": "_escaped_string"
655
719
  }
656
720
  ]
657
721
  },
658
- "value": {
722
+ "_raw_string": {
659
723
  "type": "SEQ",
660
724
  "members": [
725
+ {
726
+ "type": "SYMBOL",
727
+ "name": "_raw_string_start"
728
+ },
661
729
  {
662
730
  "type": "CHOICE",
663
731
  "members": [
664
732
  {
665
- "type": "SYMBOL",
666
- "name": "type"
733
+ "type": "ALIAS",
734
+ "content": {
735
+ "type": "SYMBOL",
736
+ "name": "_raw_string_content"
737
+ },
738
+ "named": true,
739
+ "value": "string_fragment"
667
740
  },
668
741
  {
669
742
  "type": "BLANK"
@@ -671,62 +744,80 @@
671
744
  ]
672
745
  },
673
746
  {
674
- "type": "CHOICE",
675
- "members": [
676
- {
677
- "type": "SYMBOL",
678
- "name": "string"
679
- },
680
- {
681
- "type": "SYMBOL",
682
- "name": "number"
683
- },
684
- {
685
- "type": "SYMBOL",
686
- "name": "keyword"
687
- }
688
- ]
747
+ "type": "SYMBOL",
748
+ "name": "_raw_string_end"
689
749
  }
690
750
  ]
691
751
  },
692
- "type": {
752
+ "multi_line_string": {
693
753
  "type": "SEQ",
694
754
  "members": [
695
755
  {
696
- "type": "STRING",
697
- "value": "("
756
+ "type": "SYMBOL",
757
+ "name": "_multiline_open"
698
758
  },
699
759
  {
700
- "type": "CHOICE",
701
- "members": [
702
- {
703
- "type": "SYMBOL",
704
- "name": "identifier"
705
- },
706
- {
707
- "type": "SYMBOL",
708
- "name": "annotation_type"
709
- }
710
- ]
760
+ "type": "REPEAT",
761
+ "content": {
762
+ "type": "CHOICE",
763
+ "members": [
764
+ {
765
+ "type": "ALIAS",
766
+ "content": {
767
+ "type": "SYMBOL",
768
+ "name": "_multiline_fragment"
769
+ },
770
+ "named": true,
771
+ "value": "string_fragment"
772
+ },
773
+ {
774
+ "type": "SYMBOL",
775
+ "name": "escape"
776
+ },
777
+ {
778
+ "type": "SYMBOL",
779
+ "name": "escaped_whitespace"
780
+ }
781
+ ]
782
+ }
711
783
  },
712
784
  {
713
785
  "type": "STRING",
714
- "value": ")"
786
+ "value": "\"\"\""
715
787
  }
716
788
  ]
717
789
  },
718
- "string": {
719
- "type": "CHOICE",
720
- "members": [
721
- {
722
- "type": "SYMBOL",
723
- "name": "_raw_string"
724
- },
725
- {
726
- "type": "SYMBOL",
727
- "name": "_escaped_string"
728
- }
729
- ]
790
+ "_multiline_open": {
791
+ "type": "TOKEN",
792
+ "content": {
793
+ "type": "SEQ",
794
+ "members": [
795
+ {
796
+ "type": "STRING",
797
+ "value": "\"\"\""
798
+ },
799
+ {
800
+ "type": "CHOICE",
801
+ "members": [
802
+ {
803
+ "type": "STRING",
804
+ "value": "\r\n"
805
+ },
806
+ {
807
+ "type": "PATTERN",
808
+ "value": "[\\r\\n\\u0085\\u000B\\u000C\\u2028\\u2029]"
809
+ }
810
+ ]
811
+ }
812
+ ]
813
+ }
814
+ },
815
+ "_multiline_fragment": {
816
+ "type": "IMMEDIATE_TOKEN",
817
+ "content": {
818
+ "type": "PATTERN",
819
+ "value": "(?:[^\"\\\\\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]|\"[^\"\\\\\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]|\"\"[^\"\\\\\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF])+"
820
+ }
730
821
  },
731
822
  "_escaped_string": {
732
823
  "type": "SEQ",
@@ -736,25 +827,29 @@
736
827
  "value": "\""
737
828
  },
738
829
  {
739
- "type": "ALIAS",
830
+ "type": "REPEAT",
740
831
  "content": {
741
- "type": "REPEAT",
742
- "content": {
743
- "type": "CHOICE",
744
- "members": [
745
- {
832
+ "type": "CHOICE",
833
+ "members": [
834
+ {
835
+ "type": "ALIAS",
836
+ "content": {
746
837
  "type": "SYMBOL",
747
- "name": "escape"
838
+ "name": "_string_fragment"
748
839
  },
749
- {
750
- "type": "PATTERN",
751
- "value": "[^\"]"
752
- }
753
- ]
754
- }
755
- },
756
- "named": true,
757
- "value": "string_fragment"
840
+ "named": true,
841
+ "value": "string_fragment"
842
+ },
843
+ {
844
+ "type": "SYMBOL",
845
+ "name": "escape"
846
+ },
847
+ {
848
+ "type": "SYMBOL",
849
+ "name": "escaped_whitespace"
850
+ }
851
+ ]
852
+ }
758
853
  },
759
854
  {
760
855
  "type": "STRING",
@@ -762,107 +857,84 @@
762
857
  }
763
858
  ]
764
859
  },
765
- "_character": {
766
- "type": "CHOICE",
767
- "members": [
768
- {
769
- "type": "SYMBOL",
770
- "name": "escape"
771
- },
772
- {
773
- "type": "PATTERN",
774
- "value": "[^\"]"
775
- }
776
- ]
777
- },
778
- "escape": {
860
+ "_string_fragment": {
779
861
  "type": "IMMEDIATE_TOKEN",
780
862
  "content": {
781
863
  "type": "PATTERN",
782
- "value": "\\\\\\\\|\\\\\"|\\\\\\/|\\\\b|\\\\f|\\\\n|\\\\r|\\\\t|\\\\u\\{[0-9a-fA-F]{1,6}\\}"
864
+ "value": "[^\"\\\\\\u0000-\\u0008\\u000E-\\u001F\\u007F\\u200E\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]+"
783
865
  }
784
866
  },
785
- "_hex_digit": {
786
- "type": "PATTERN",
787
- "value": "[0-9a-fA-F]"
867
+ "escape": {
868
+ "type": "IMMEDIATE_TOKEN",
869
+ "content": {
870
+ "type": "SEQ",
871
+ "members": [
872
+ {
873
+ "type": "STRING",
874
+ "value": "\\"
875
+ },
876
+ {
877
+ "type": "CHOICE",
878
+ "members": [
879
+ {
880
+ "type": "STRING",
881
+ "value": "\\"
882
+ },
883
+ {
884
+ "type": "STRING",
885
+ "value": "\""
886
+ },
887
+ {
888
+ "type": "STRING",
889
+ "value": "/"
890
+ },
891
+ {
892
+ "type": "STRING",
893
+ "value": "b"
894
+ },
895
+ {
896
+ "type": "STRING",
897
+ "value": "f"
898
+ },
899
+ {
900
+ "type": "STRING",
901
+ "value": "n"
902
+ },
903
+ {
904
+ "type": "STRING",
905
+ "value": "r"
906
+ },
907
+ {
908
+ "type": "STRING",
909
+ "value": "t"
910
+ },
911
+ {
912
+ "type": "STRING",
913
+ "value": "s"
914
+ },
915
+ {
916
+ "type": "PATTERN",
917
+ "value": "u\\{(?:[0-9a-fA-F]{1,3}|(?:[0-9a-cA-Ce-fE-F][0-9a-fA-F]{3}|[dD][0-7][0-9a-fA-F]{2})|(?:[1-9a-fA-F][0-9a-fA-F]{4}|0(?:[0-9a-cA-Ce-fE-F][0-9a-fA-F]{3}|[dD][0-7][0-9a-fA-F]{2}))|(?:0(?:[1-9a-fA-F][0-9a-fA-F]{4}|0(?:[0-9a-cA-Ce-fE-F][0-9a-fA-F]{3}|[dD][0-7][0-9a-fA-F]{2}))|10[0-9a-fA-F]{4}))\\}"
918
+ }
919
+ ]
920
+ }
921
+ ]
922
+ }
788
923
  },
789
- "_raw_string": {
790
- "type": "SEQ",
791
- "members": [
792
- {
793
- "type": "CHOICE",
794
- "members": [
795
- {
796
- "type": "SEQ",
797
- "members": [
798
- {
799
- "type": "IMMEDIATE_TOKEN",
800
- "content": {
801
- "type": "SEQ",
802
- "members": [
803
- {
804
- "type": "STRING",
805
- "value": "r"
806
- },
807
- {
808
- "type": "REPEAT1",
809
- "content": {
810
- "type": "STRING",
811
- "value": "#"
812
- }
813
- }
814
- ]
815
- }
816
- },
817
- {
818
- "type": "PATTERN",
819
- "value": "[^#]*"
820
- },
821
- {
822
- "type": "REPEAT1",
823
- "content": {
824
- "type": "STRING",
825
- "value": "#"
826
- }
827
- }
828
- ]
829
- },
830
- {
831
- "type": "SEQ",
832
- "members": [
833
- {
834
- "type": "IMMEDIATE_TOKEN",
835
- "content": {
836
- "type": "SEQ",
837
- "members": [
838
- {
839
- "type": "STRING",
840
- "value": "r"
841
- },
842
- {
843
- "type": "STRING",
844
- "value": "\""
845
- }
846
- ]
847
- }
848
- },
849
- {
850
- "type": "PATTERN",
851
- "value": "[^\"]*"
852
- },
853
- {
854
- "type": "STRING",
855
- "value": "\""
856
- }
857
- ]
858
- }
859
- ]
860
- }
861
- ]
924
+ "escaped_whitespace": {
925
+ "type": "IMMEDIATE_TOKEN",
926
+ "content": {
927
+ "type": "PATTERN",
928
+ "value": "\\\\(?:\\r\\n|[\\u0009\\u0020\\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\r\\n\\u0085\\u000B\\u000C\\u2028\\u2029])+"
929
+ }
862
930
  },
863
931
  "number": {
864
932
  "type": "CHOICE",
865
933
  "members": [
934
+ {
935
+ "type": "SYMBOL",
936
+ "name": "keyword_number"
937
+ },
866
938
  {
867
939
  "type": "SYMBOL",
868
940
  "name": "_decimal"
@@ -878,24 +950,12 @@
878
950
  {
879
951
  "type": "SYMBOL",
880
952
  "name": "_binary"
881
- }
882
- ]
883
- },
884
- "_decimal": {
885
- "type": "SEQ",
886
- "members": [
887
- {
888
- "type": "CHOICE",
889
- "members": [
890
- {
891
- "type": "SYMBOL",
892
- "name": "_sign"
893
- },
894
- {
895
- "type": "BLANK"
896
- }
897
- ]
898
- },
953
+ }
954
+ ]
955
+ },
956
+ "_decimal": {
957
+ "type": "SEQ",
958
+ "members": [
899
959
  {
900
960
  "type": "SYMBOL",
901
961
  "name": "_integer"
@@ -914,7 +974,7 @@
914
974
  "type": "ALIAS",
915
975
  "content": {
916
976
  "type": "SYMBOL",
917
- "name": "_integer"
977
+ "name": "_fraction"
918
978
  },
919
979
  "named": true,
920
980
  "value": "decimal"
@@ -945,228 +1005,132 @@
945
1005
  }
946
1006
  ]
947
1007
  },
948
- "_exponent": {
949
- "type": "SEQ",
950
- "members": [
951
- {
952
- "type": "CHOICE",
953
- "members": [
954
- {
955
- "type": "STRING",
956
- "value": "e"
957
- },
958
- {
959
- "type": "STRING",
960
- "value": "E"
961
- }
962
- ]
963
- },
964
- {
965
- "type": "CHOICE",
966
- "members": [
967
- {
968
- "type": "SYMBOL",
969
- "name": "_sign"
970
- },
971
- {
972
- "type": "BLANK"
973
- }
974
- ]
975
- },
976
- {
977
- "type": "SYMBOL",
978
- "name": "_integer"
979
- }
980
- ]
981
- },
982
1008
  "_integer": {
983
- "type": "SEQ",
984
- "members": [
985
- {
986
- "type": "SYMBOL",
987
- "name": "_digit"
988
- },
989
- {
990
- "type": "REPEAT",
991
- "content": {
992
- "type": "CHOICE",
993
- "members": [
994
- {
995
- "type": "SYMBOL",
996
- "name": "_digit"
997
- },
998
- {
999
- "type": "STRING",
1000
- "value": "_"
1001
- }
1002
- ]
1003
- }
1004
- }
1005
- ]
1009
+ "type": "TOKEN",
1010
+ "content": {
1011
+ "type": "PATTERN",
1012
+ "value": "[+-]?[0-9][0-9_]*"
1013
+ }
1006
1014
  },
1007
- "_digit": {
1008
- "type": "PATTERN",
1009
- "value": "[0-9]"
1015
+ "_fraction": {
1016
+ "type": "IMMEDIATE_TOKEN",
1017
+ "content": {
1018
+ "type": "PATTERN",
1019
+ "value": "[0-9][0-9_]*"
1020
+ }
1010
1021
  },
1011
- "_sign": {
1012
- "type": "CHOICE",
1013
- "members": [
1014
- {
1015
- "type": "STRING",
1016
- "value": "+"
1017
- },
1018
- {
1019
- "type": "STRING",
1020
- "value": "-"
1021
- }
1022
- ]
1022
+ "_exponent": {
1023
+ "type": "IMMEDIATE_TOKEN",
1024
+ "content": {
1025
+ "type": "PATTERN",
1026
+ "value": "[eE][+-]?[0-9][0-9_]*"
1027
+ }
1023
1028
  },
1024
1029
  "_hex": {
1025
- "type": "SEQ",
1026
- "members": [
1027
- {
1028
- "type": "CHOICE",
1029
- "members": [
1030
- {
1031
- "type": "SYMBOL",
1032
- "name": "_sign"
1033
- },
1034
- {
1035
- "type": "BLANK"
1036
- }
1037
- ]
1038
- },
1039
- {
1040
- "type": "STRING",
1041
- "value": "0x"
1042
- },
1043
- {
1044
- "type": "SYMBOL",
1045
- "name": "_hex_digit"
1046
- },
1047
- {
1048
- "type": "REPEAT",
1049
- "content": {
1050
- "type": "CHOICE",
1051
- "members": [
1052
- {
1053
- "type": "SYMBOL",
1054
- "name": "_hex_digit"
1055
- },
1056
- {
1057
- "type": "STRING",
1058
- "value": "_"
1059
- }
1060
- ]
1061
- }
1062
- }
1063
- ]
1030
+ "type": "TOKEN",
1031
+ "content": {
1032
+ "type": "PATTERN",
1033
+ "value": "[+-]?0x[0-9a-fA-F][0-9a-fA-F_]*"
1034
+ }
1064
1035
  },
1065
1036
  "_octal": {
1066
- "type": "SEQ",
1037
+ "type": "TOKEN",
1038
+ "content": {
1039
+ "type": "PATTERN",
1040
+ "value": "[+-]?0o[0-7][0-7_]*"
1041
+ }
1042
+ },
1043
+ "_binary": {
1044
+ "type": "TOKEN",
1045
+ "content": {
1046
+ "type": "PATTERN",
1047
+ "value": "[+-]?0b[01][01_]*"
1048
+ }
1049
+ },
1050
+ "keyword_number": {
1051
+ "type": "CHOICE",
1067
1052
  "members": [
1068
1053
  {
1069
- "type": "CHOICE",
1070
- "members": [
1071
- {
1072
- "type": "SYMBOL",
1073
- "name": "_sign"
1074
- },
1075
- {
1076
- "type": "BLANK"
1054
+ "type": "TOKEN",
1055
+ "content": {
1056
+ "type": "PREC",
1057
+ "value": 2,
1058
+ "content": {
1059
+ "type": "STRING",
1060
+ "value": "#inf"
1077
1061
  }
1078
- ]
1079
- },
1080
- {
1081
- "type": "STRING",
1082
- "value": "0o"
1062
+ }
1083
1063
  },
1084
1064
  {
1085
- "type": "PATTERN",
1086
- "value": "[0-7]"
1065
+ "type": "TOKEN",
1066
+ "content": {
1067
+ "type": "PREC",
1068
+ "value": 2,
1069
+ "content": {
1070
+ "type": "STRING",
1071
+ "value": "#-inf"
1072
+ }
1073
+ }
1087
1074
  },
1088
1075
  {
1089
- "type": "REPEAT",
1076
+ "type": "TOKEN",
1090
1077
  "content": {
1091
- "type": "CHOICE",
1092
- "members": [
1093
- {
1094
- "type": "PATTERN",
1095
- "value": "[0-7]"
1096
- },
1097
- {
1098
- "type": "STRING",
1099
- "value": "_"
1100
- }
1101
- ]
1078
+ "type": "PREC",
1079
+ "value": 2,
1080
+ "content": {
1081
+ "type": "STRING",
1082
+ "value": "#nan"
1083
+ }
1102
1084
  }
1103
1085
  }
1104
1086
  ]
1105
1087
  },
1106
- "_binary": {
1107
- "type": "SEQ",
1088
+ "boolean": {
1089
+ "type": "CHOICE",
1108
1090
  "members": [
1109
1091
  {
1110
- "type": "CHOICE",
1111
- "members": [
1112
- {
1113
- "type": "SYMBOL",
1114
- "name": "_sign"
1115
- },
1116
- {
1117
- "type": "BLANK"
1092
+ "type": "TOKEN",
1093
+ "content": {
1094
+ "type": "PREC",
1095
+ "value": 2,
1096
+ "content": {
1097
+ "type": "STRING",
1098
+ "value": "true"
1118
1099
  }
1119
- ]
1120
- },
1121
- {
1122
- "type": "STRING",
1123
- "value": "0b"
1100
+ }
1124
1101
  },
1125
1102
  {
1126
- "type": "CHOICE",
1127
- "members": [
1128
- {
1129
- "type": "STRING",
1130
- "value": "0"
1131
- },
1132
- {
1103
+ "type": "TOKEN",
1104
+ "content": {
1105
+ "type": "PREC",
1106
+ "value": 2,
1107
+ "content": {
1133
1108
  "type": "STRING",
1134
- "value": "1"
1109
+ "value": "false"
1135
1110
  }
1136
- ]
1111
+ }
1137
1112
  },
1138
1113
  {
1139
- "type": "REPEAT",
1114
+ "type": "TOKEN",
1140
1115
  "content": {
1141
- "type": "CHOICE",
1142
- "members": [
1143
- {
1144
- "type": "STRING",
1145
- "value": "0"
1146
- },
1147
- {
1148
- "type": "STRING",
1149
- "value": "1"
1150
- },
1151
- {
1152
- "type": "STRING",
1153
- "value": "_"
1154
- }
1155
- ]
1116
+ "type": "PREC",
1117
+ "value": 2,
1118
+ "content": {
1119
+ "type": "STRING",
1120
+ "value": "#true"
1121
+ }
1156
1122
  }
1157
- }
1158
- ]
1159
- },
1160
- "boolean": {
1161
- "type": "CHOICE",
1162
- "members": [
1163
- {
1164
- "type": "STRING",
1165
- "value": "true"
1166
1123
  },
1167
1124
  {
1168
- "type": "STRING",
1169
- "value": "false"
1125
+ "type": "TOKEN",
1126
+ "content": {
1127
+ "type": "PREC",
1128
+ "value": 2,
1129
+ "content": {
1130
+ "type": "STRING",
1131
+ "value": "#false"
1132
+ }
1133
+ }
1170
1134
  }
1171
1135
  ]
1172
1136
  },
@@ -1194,6 +1158,10 @@
1194
1158
  {
1195
1159
  "type": "SYMBOL",
1196
1160
  "name": "_newline"
1161
+ },
1162
+ {
1163
+ "type": "SYMBOL",
1164
+ "name": "_eof"
1197
1165
  }
1198
1166
  ]
1199
1167
  }
@@ -1204,11 +1172,15 @@
1204
1172
  "members": [
1205
1173
  {
1206
1174
  "type": "SYMBOL",
1207
- "name": "_newline"
1175
+ "name": "_ws"
1208
1176
  },
1209
1177
  {
1210
1178
  "type": "SYMBOL",
1211
- "name": "_ws"
1179
+ "name": "_escline"
1180
+ },
1181
+ {
1182
+ "type": "SYMBOL",
1183
+ "name": "_newline"
1212
1184
  },
1213
1185
  {
1214
1186
  "type": "SYMBOL",
@@ -1221,20 +1193,24 @@
1221
1193
  "members": [
1222
1194
  {
1223
1195
  "type": "PATTERN",
1224
- "value": "\\r'"
1196
+ "value": "\\r\\n"
1225
1197
  },
1226
1198
  {
1227
1199
  "type": "PATTERN",
1228
- "value": "\\n"
1200
+ "value": "\\r"
1229
1201
  },
1230
1202
  {
1231
1203
  "type": "PATTERN",
1232
- "value": "\\r\\n"
1204
+ "value": "\\n"
1233
1205
  },
1234
1206
  {
1235
1207
  "type": "PATTERN",
1236
1208
  "value": "\\u0085"
1237
1209
  },
1210
+ {
1211
+ "type": "PATTERN",
1212
+ "value": "\\u000B"
1213
+ },
1238
1214
  {
1239
1215
  "type": "PATTERN",
1240
1216
  "value": "\\u000C"
@@ -1252,10 +1228,6 @@
1252
1228
  "_ws": {
1253
1229
  "type": "CHOICE",
1254
1230
  "members": [
1255
- {
1256
- "type": "SYMBOL",
1257
- "name": "_bom"
1258
- },
1259
1231
  {
1260
1232
  "type": "SYMBOL",
1261
1233
  "name": "_unicode_space"
@@ -1285,7 +1257,7 @@
1285
1257
  "type": "REPEAT",
1286
1258
  "content": {
1287
1259
  "type": "PATTERN",
1288
- "value": "[^\\r\\n\\u0085\\u000C\\u2028\\u2029]"
1260
+ "value": "[^\\r\\n\\u0085\\u000B\\u000C\\u2028\\u2029]"
1289
1261
  }
1290
1262
  },
1291
1263
  {
@@ -1312,13 +1284,12 @@
1312
1284
  ],
1313
1285
  "conflicts": [
1314
1286
  [
1315
- "document"
1316
- ],
1317
- [
1318
- "_node_space"
1287
+ "version",
1288
+ "_ws"
1319
1289
  ],
1320
1290
  [
1321
- "node_children"
1291
+ "identifier",
1292
+ "value"
1322
1293
  ]
1323
1294
  ],
1324
1295
  "precedences": [],
@@ -1330,9 +1301,21 @@
1330
1301
  {
1331
1302
  "type": "SYMBOL",
1332
1303
  "name": "multi_line_comment"
1304
+ },
1305
+ {
1306
+ "type": "SYMBOL",
1307
+ "name": "_raw_string_start"
1308
+ },
1309
+ {
1310
+ "type": "SYMBOL",
1311
+ "name": "_raw_string_content"
1312
+ },
1313
+ {
1314
+ "type": "SYMBOL",
1315
+ "name": "_raw_string_end"
1333
1316
  }
1334
1317
  ],
1335
1318
  "inline": [],
1336
- "supertypes": []
1337
- }
1338
-
1319
+ "supertypes": [],
1320
+ "reserved": {}
1321
+ }