tree-sitter-ucode 0.4.0 → 0.5.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.
- package/README.md +2 -2
- package/grammar.js +7 -7
- package/markup/grammar.js +7 -7
- package/markup/src/grammar.json +42 -14
- package/markup/src/node-types.json +51 -38
- package/markup/src/parser.c +54606 -54555
- package/package.json +4 -1
- package/prebuilds/darwin-arm64/tree-sitter-ucode.node +0 -0
- package/prebuilds/linux-arm64/tree-sitter-ucode.node +0 -0
- package/prebuilds/linux-x64/tree-sitter-ucode.node +0 -0
- package/prebuilds/win32-x64/tree-sitter-ucode.node +0 -0
- package/queries/locals.scm +7 -0
- package/queries/tags.scm +15 -2
- package/src/grammar.json +42 -14
- package/src/node-types.json +51 -38
- package/src/parser.c +46389 -46338
- package/tree-sitter-ucode.wasm +0 -0
- package/tree-sitter-ucode_markup.wasm +0 -0
- package/tree-sitter.json +14 -1
- package/ucdocs/grammar.js +284 -0
- package/ucdocs/queries/highlights.scm +25 -0
- package/ucdocs/queries/tags.scm +22 -0
- package/ucdocs/src/grammar.json +1437 -0
- package/ucdocs/src/node-types.json +1347 -0
- package/ucdocs/src/parser.c +6387 -0
- package/ucdocs/src/tree_sitter/alloc.h +54 -0
- package/ucdocs/src/tree_sitter/array.h +330 -0
- package/ucdocs/src/tree_sitter/parser.h +286 -0
package/README.md
CHANGED
|
@@ -102,11 +102,11 @@ grammar = "ucode_markup"
|
|
|
102
102
|
|
|
103
103
|
[[grammar]]
|
|
104
104
|
name = "ucode"
|
|
105
|
-
source = { git = "https://github.com/m00qek/tree-sitter-ucode", rev = "v0.
|
|
105
|
+
source = { git = "https://github.com/m00qek/tree-sitter-ucode", rev = "v0.5.0" }
|
|
106
106
|
|
|
107
107
|
[[grammar]]
|
|
108
108
|
name = "ucode_markup"
|
|
109
|
-
source = { git = "https://github.com/m00qek/tree-sitter-ucode", rev = "v0.
|
|
109
|
+
source = { git = "https://github.com/m00qek/tree-sitter-ucode", rev = "v0.5.0", subpath = "markup" }
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
Helix does not support content-based filetype detection for shared extensions. For
|
package/grammar.js
CHANGED
|
@@ -205,7 +205,7 @@ module.exports = grammar({
|
|
|
205
205
|
export_statement: $ => choice(
|
|
206
206
|
seq(
|
|
207
207
|
'export',
|
|
208
|
-
$.export_clause,
|
|
208
|
+
field('clause', $.export_clause),
|
|
209
209
|
$._semicolon,
|
|
210
210
|
),
|
|
211
211
|
seq(
|
|
@@ -257,22 +257,22 @@ module.exports = grammar({
|
|
|
257
257
|
import_statement: $ => seq(
|
|
258
258
|
'import',
|
|
259
259
|
choice(
|
|
260
|
-
seq($.import_clause, 'from', field('source', $.string)),
|
|
260
|
+
seq(field('clause', $.import_clause), 'from', field('source', $.string)),
|
|
261
261
|
field('source', $.string),
|
|
262
262
|
),
|
|
263
263
|
$._semicolon,
|
|
264
264
|
),
|
|
265
265
|
|
|
266
266
|
import_clause: $ => choice(
|
|
267
|
-
$.namespace_import,
|
|
268
|
-
$.named_imports,
|
|
267
|
+
field('namespace', $.namespace_import),
|
|
268
|
+
field('named', $.named_imports),
|
|
269
269
|
seq(
|
|
270
|
-
$.identifier,
|
|
270
|
+
field('default', $.identifier),
|
|
271
271
|
optional(seq(
|
|
272
272
|
',',
|
|
273
273
|
choice(
|
|
274
|
-
$.namespace_import,
|
|
275
|
-
$.named_imports,
|
|
274
|
+
field('namespace', $.namespace_import),
|
|
275
|
+
field('named', $.named_imports),
|
|
276
276
|
),
|
|
277
277
|
)),
|
|
278
278
|
),
|
package/markup/grammar.js
CHANGED
|
@@ -206,7 +206,7 @@ module.exports = grammar({
|
|
|
206
206
|
export_statement: $ => choice(
|
|
207
207
|
seq(
|
|
208
208
|
'export',
|
|
209
|
-
$.export_clause,
|
|
209
|
+
field('clause', $.export_clause),
|
|
210
210
|
$._semicolon,
|
|
211
211
|
),
|
|
212
212
|
seq(
|
|
@@ -258,22 +258,22 @@ module.exports = grammar({
|
|
|
258
258
|
import_statement: $ => seq(
|
|
259
259
|
'import',
|
|
260
260
|
choice(
|
|
261
|
-
seq($.import_clause, 'from', field('source', $.string)),
|
|
261
|
+
seq(field('clause', $.import_clause), 'from', field('source', $.string)),
|
|
262
262
|
field('source', $.string),
|
|
263
263
|
),
|
|
264
264
|
$._semicolon,
|
|
265
265
|
),
|
|
266
266
|
|
|
267
267
|
import_clause: $ => choice(
|
|
268
|
-
$.namespace_import,
|
|
269
|
-
$.named_imports,
|
|
268
|
+
field('namespace', $.namespace_import),
|
|
269
|
+
field('named', $.named_imports),
|
|
270
270
|
seq(
|
|
271
|
-
$.identifier,
|
|
271
|
+
field('default', $.identifier),
|
|
272
272
|
optional(seq(
|
|
273
273
|
',',
|
|
274
274
|
choice(
|
|
275
|
-
$.namespace_import,
|
|
276
|
-
$.named_imports,
|
|
275
|
+
field('namespace', $.namespace_import),
|
|
276
|
+
field('named', $.named_imports),
|
|
277
277
|
),
|
|
278
278
|
)),
|
|
279
279
|
),
|
package/markup/src/grammar.json
CHANGED
|
@@ -223,8 +223,12 @@
|
|
|
223
223
|
"value": "export"
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
"type": "
|
|
227
|
-
"name": "
|
|
226
|
+
"type": "FIELD",
|
|
227
|
+
"name": "clause",
|
|
228
|
+
"content": {
|
|
229
|
+
"type": "SYMBOL",
|
|
230
|
+
"name": "export_clause"
|
|
231
|
+
}
|
|
228
232
|
},
|
|
229
233
|
{
|
|
230
234
|
"type": "SYMBOL",
|
|
@@ -422,8 +426,12 @@
|
|
|
422
426
|
"type": "SEQ",
|
|
423
427
|
"members": [
|
|
424
428
|
{
|
|
425
|
-
"type": "
|
|
426
|
-
"name": "
|
|
429
|
+
"type": "FIELD",
|
|
430
|
+
"name": "clause",
|
|
431
|
+
"content": {
|
|
432
|
+
"type": "SYMBOL",
|
|
433
|
+
"name": "import_clause"
|
|
434
|
+
}
|
|
427
435
|
},
|
|
428
436
|
{
|
|
429
437
|
"type": "STRING",
|
|
@@ -459,19 +467,31 @@
|
|
|
459
467
|
"type": "CHOICE",
|
|
460
468
|
"members": [
|
|
461
469
|
{
|
|
462
|
-
"type": "
|
|
463
|
-
"name": "
|
|
470
|
+
"type": "FIELD",
|
|
471
|
+
"name": "namespace",
|
|
472
|
+
"content": {
|
|
473
|
+
"type": "SYMBOL",
|
|
474
|
+
"name": "namespace_import"
|
|
475
|
+
}
|
|
464
476
|
},
|
|
465
477
|
{
|
|
466
|
-
"type": "
|
|
467
|
-
"name": "
|
|
478
|
+
"type": "FIELD",
|
|
479
|
+
"name": "named",
|
|
480
|
+
"content": {
|
|
481
|
+
"type": "SYMBOL",
|
|
482
|
+
"name": "named_imports"
|
|
483
|
+
}
|
|
468
484
|
},
|
|
469
485
|
{
|
|
470
486
|
"type": "SEQ",
|
|
471
487
|
"members": [
|
|
472
488
|
{
|
|
473
|
-
"type": "
|
|
474
|
-
"name": "
|
|
489
|
+
"type": "FIELD",
|
|
490
|
+
"name": "default",
|
|
491
|
+
"content": {
|
|
492
|
+
"type": "SYMBOL",
|
|
493
|
+
"name": "identifier"
|
|
494
|
+
}
|
|
475
495
|
},
|
|
476
496
|
{
|
|
477
497
|
"type": "CHOICE",
|
|
@@ -487,12 +507,20 @@
|
|
|
487
507
|
"type": "CHOICE",
|
|
488
508
|
"members": [
|
|
489
509
|
{
|
|
490
|
-
"type": "
|
|
491
|
-
"name": "
|
|
510
|
+
"type": "FIELD",
|
|
511
|
+
"name": "namespace",
|
|
512
|
+
"content": {
|
|
513
|
+
"type": "SYMBOL",
|
|
514
|
+
"name": "namespace_import"
|
|
515
|
+
}
|
|
492
516
|
},
|
|
493
517
|
{
|
|
494
|
-
"type": "
|
|
495
|
-
"name": "
|
|
518
|
+
"type": "FIELD",
|
|
519
|
+
"name": "named",
|
|
520
|
+
"content": {
|
|
521
|
+
"type": "SYMBOL",
|
|
522
|
+
"name": "named_imports"
|
|
523
|
+
}
|
|
496
524
|
}
|
|
497
525
|
]
|
|
498
526
|
}
|
|
@@ -909,6 +909,16 @@
|
|
|
909
909
|
"type": "export_statement",
|
|
910
910
|
"named": true,
|
|
911
911
|
"fields": {
|
|
912
|
+
"clause": {
|
|
913
|
+
"multiple": false,
|
|
914
|
+
"required": false,
|
|
915
|
+
"types": [
|
|
916
|
+
{
|
|
917
|
+
"type": "export_clause",
|
|
918
|
+
"named": true
|
|
919
|
+
}
|
|
920
|
+
]
|
|
921
|
+
},
|
|
912
922
|
"declaration": {
|
|
913
923
|
"multiple": false,
|
|
914
924
|
"required": false,
|
|
@@ -929,16 +939,6 @@
|
|
|
929
939
|
}
|
|
930
940
|
]
|
|
931
941
|
}
|
|
932
|
-
},
|
|
933
|
-
"children": {
|
|
934
|
-
"multiple": false,
|
|
935
|
-
"required": false,
|
|
936
|
-
"types": [
|
|
937
|
-
{
|
|
938
|
-
"type": "export_clause",
|
|
939
|
-
"named": true
|
|
940
|
-
}
|
|
941
|
-
]
|
|
942
942
|
}
|
|
943
943
|
},
|
|
944
944
|
{
|
|
@@ -1762,24 +1762,37 @@
|
|
|
1762
1762
|
{
|
|
1763
1763
|
"type": "import_clause",
|
|
1764
1764
|
"named": true,
|
|
1765
|
-
"fields": {
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1765
|
+
"fields": {
|
|
1766
|
+
"default": {
|
|
1767
|
+
"multiple": false,
|
|
1768
|
+
"required": false,
|
|
1769
|
+
"types": [
|
|
1770
|
+
{
|
|
1771
|
+
"type": "identifier",
|
|
1772
|
+
"named": true
|
|
1773
|
+
}
|
|
1774
|
+
]
|
|
1775
|
+
},
|
|
1776
|
+
"named": {
|
|
1777
|
+
"multiple": false,
|
|
1778
|
+
"required": false,
|
|
1779
|
+
"types": [
|
|
1780
|
+
{
|
|
1781
|
+
"type": "named_imports",
|
|
1782
|
+
"named": true
|
|
1783
|
+
}
|
|
1784
|
+
]
|
|
1785
|
+
},
|
|
1786
|
+
"namespace": {
|
|
1787
|
+
"multiple": false,
|
|
1788
|
+
"required": false,
|
|
1789
|
+
"types": [
|
|
1790
|
+
{
|
|
1791
|
+
"type": "namespace_import",
|
|
1792
|
+
"named": true
|
|
1793
|
+
}
|
|
1794
|
+
]
|
|
1795
|
+
}
|
|
1783
1796
|
}
|
|
1784
1797
|
},
|
|
1785
1798
|
{
|
|
@@ -1820,6 +1833,16 @@
|
|
|
1820
1833
|
"type": "import_statement",
|
|
1821
1834
|
"named": true,
|
|
1822
1835
|
"fields": {
|
|
1836
|
+
"clause": {
|
|
1837
|
+
"multiple": false,
|
|
1838
|
+
"required": false,
|
|
1839
|
+
"types": [
|
|
1840
|
+
{
|
|
1841
|
+
"type": "import_clause",
|
|
1842
|
+
"named": true
|
|
1843
|
+
}
|
|
1844
|
+
]
|
|
1845
|
+
},
|
|
1823
1846
|
"source": {
|
|
1824
1847
|
"multiple": false,
|
|
1825
1848
|
"required": true,
|
|
@@ -1830,16 +1853,6 @@
|
|
|
1830
1853
|
}
|
|
1831
1854
|
]
|
|
1832
1855
|
}
|
|
1833
|
-
},
|
|
1834
|
-
"children": {
|
|
1835
|
-
"multiple": false,
|
|
1836
|
-
"required": false,
|
|
1837
|
-
"types": [
|
|
1838
|
-
{
|
|
1839
|
-
"type": "import_clause",
|
|
1840
|
-
"named": true
|
|
1841
|
-
}
|
|
1842
|
-
]
|
|
1843
1856
|
}
|
|
1844
1857
|
},
|
|
1845
1858
|
{
|