tree-sitter-beancount 2.3.2 → 2.4.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 +334 -4
- package/binding.gyp +17 -7
- package/bindings/node/binding.cc +14 -22
- package/bindings/node/index.d.ts +28 -0
- package/bindings/node/index.js +3 -15
- package/grammar.js +52 -128
- package/package.json +35 -5
- package/src/grammar.json +272 -562
- package/src/node-types.json +76 -21
- package/src/parser.c +8740 -8678
- package/src/scanner.c +345 -67
- package/src/tree_sitter/alloc.h +54 -0
- package/src/tree_sitter/array.h +291 -0
- package/src/tree_sitter/parser.h +68 -12
- package/.clang-format +0 -20
- package/.envrc +0 -1
- package/.gitattributes +0 -6
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/cicd.yml +0 -30
- package/.github/workflows/release.yml +0 -72
- package/CHANGELOG.md +0 -72
- package/Cargo.lock +0 -59
- package/Cargo.toml +0 -26
- package/Package.swift +0 -20
- package/bindings/rust/build.rs +0 -39
- package/bindings/rust/lib.rs +0 -52
- package/flake.lock +0 -141
- package/flake.nix +0 -120
- package/test/corpus/arithmetic.txt +0 -373
- package/test/corpus/comment.txt +0 -172
- package/test/corpus/currencies.txt +0 -66
- package/test/corpus/entry_types.txt +0 -389
- package/test/corpus/markdown_orgmode.txt +0 -60
- package/test/corpus/metadata.txt +0 -414
- package/test/corpus/multi_line.txt +0 -27
- package/test/corpus/orgmode_sections.txt +0 -53
- package/test/corpus/parse_lots.txt +0 -417
- package/test/corpus/parser_include.txt +0 -23
- package/test/corpus/parser_links.txt +0 -32
- package/test/corpus/parser_options.txt +0 -39
- package/test/corpus/parser_plugin.txt +0 -35
- package/test/corpus/push_pop_meta.txt +0 -34
- package/test/corpus/push_pop_tag.txt +0 -23
- package/test/corpus/transaction.txt +0 -224
- package/test/corpus/ugly_bugs.txt +0 -52
package/src/node-types.json
CHANGED
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
]
|
|
172
172
|
},
|
|
173
173
|
"comment": {
|
|
174
|
-
"multiple":
|
|
174
|
+
"multiple": true,
|
|
175
175
|
"required": false,
|
|
176
176
|
"types": [
|
|
177
177
|
{
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
]
|
|
257
257
|
},
|
|
258
258
|
"comment": {
|
|
259
|
-
"multiple":
|
|
259
|
+
"multiple": true,
|
|
260
260
|
"required": false,
|
|
261
261
|
"types": [
|
|
262
262
|
{
|
|
@@ -287,17 +287,12 @@
|
|
|
287
287
|
]
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
|
-
{
|
|
291
|
-
"type": "comment",
|
|
292
|
-
"named": true,
|
|
293
|
-
"fields": {}
|
|
294
|
-
},
|
|
295
290
|
{
|
|
296
291
|
"type": "commodity",
|
|
297
292
|
"named": true,
|
|
298
293
|
"fields": {
|
|
299
294
|
"comment": {
|
|
300
|
-
"multiple":
|
|
295
|
+
"multiple": true,
|
|
301
296
|
"required": false,
|
|
302
297
|
"types": [
|
|
303
298
|
{
|
|
@@ -453,6 +448,16 @@
|
|
|
453
448
|
"type": "custom",
|
|
454
449
|
"named": true,
|
|
455
450
|
"fields": {
|
|
451
|
+
"comment": {
|
|
452
|
+
"multiple": true,
|
|
453
|
+
"required": false,
|
|
454
|
+
"types": [
|
|
455
|
+
{
|
|
456
|
+
"type": "comment",
|
|
457
|
+
"named": true
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
},
|
|
456
461
|
"custom_value_list": {
|
|
457
462
|
"multiple": true,
|
|
458
463
|
"required": false,
|
|
@@ -552,6 +557,16 @@
|
|
|
552
557
|
}
|
|
553
558
|
]
|
|
554
559
|
},
|
|
560
|
+
"comment": {
|
|
561
|
+
"multiple": true,
|
|
562
|
+
"required": false,
|
|
563
|
+
"types": [
|
|
564
|
+
{
|
|
565
|
+
"type": "comment",
|
|
566
|
+
"named": true
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
},
|
|
555
570
|
"date": {
|
|
556
571
|
"multiple": false,
|
|
557
572
|
"required": true,
|
|
@@ -598,6 +613,16 @@
|
|
|
598
613
|
"type": "event",
|
|
599
614
|
"named": true,
|
|
600
615
|
"fields": {
|
|
616
|
+
"comment": {
|
|
617
|
+
"multiple": true,
|
|
618
|
+
"required": false,
|
|
619
|
+
"types": [
|
|
620
|
+
{
|
|
621
|
+
"type": "comment",
|
|
622
|
+
"named": true
|
|
623
|
+
}
|
|
624
|
+
]
|
|
625
|
+
},
|
|
601
626
|
"date": {
|
|
602
627
|
"multiple": false,
|
|
603
628
|
"required": true,
|
|
@@ -643,6 +668,7 @@
|
|
|
643
668
|
{
|
|
644
669
|
"type": "file",
|
|
645
670
|
"named": true,
|
|
671
|
+
"root": true,
|
|
646
672
|
"fields": {},
|
|
647
673
|
"children": {
|
|
648
674
|
"multiple": true,
|
|
@@ -744,11 +770,6 @@
|
|
|
744
770
|
]
|
|
745
771
|
}
|
|
746
772
|
},
|
|
747
|
-
{
|
|
748
|
-
"type": "item",
|
|
749
|
-
"named": true,
|
|
750
|
-
"fields": {}
|
|
751
|
-
},
|
|
752
773
|
{
|
|
753
774
|
"type": "key_value",
|
|
754
775
|
"named": true,
|
|
@@ -782,6 +803,16 @@
|
|
|
782
803
|
}
|
|
783
804
|
]
|
|
784
805
|
},
|
|
806
|
+
"comment": {
|
|
807
|
+
"multiple": true,
|
|
808
|
+
"required": false,
|
|
809
|
+
"types": [
|
|
810
|
+
{
|
|
811
|
+
"type": "comment",
|
|
812
|
+
"named": true
|
|
813
|
+
}
|
|
814
|
+
]
|
|
815
|
+
},
|
|
785
816
|
"date": {
|
|
786
817
|
"multiple": false,
|
|
787
818
|
"required": true,
|
|
@@ -829,7 +860,7 @@
|
|
|
829
860
|
]
|
|
830
861
|
},
|
|
831
862
|
"comment": {
|
|
832
|
-
"multiple":
|
|
863
|
+
"multiple": true,
|
|
833
864
|
"required": false,
|
|
834
865
|
"types": [
|
|
835
866
|
{
|
|
@@ -955,7 +986,7 @@
|
|
|
955
986
|
]
|
|
956
987
|
},
|
|
957
988
|
"comment": {
|
|
958
|
-
"multiple":
|
|
989
|
+
"multiple": true,
|
|
959
990
|
"required": false,
|
|
960
991
|
"types": [
|
|
961
992
|
{
|
|
@@ -1135,6 +1166,16 @@
|
|
|
1135
1166
|
}
|
|
1136
1167
|
]
|
|
1137
1168
|
},
|
|
1169
|
+
"comment": {
|
|
1170
|
+
"multiple": true,
|
|
1171
|
+
"required": false,
|
|
1172
|
+
"types": [
|
|
1173
|
+
{
|
|
1174
|
+
"type": "comment",
|
|
1175
|
+
"named": true
|
|
1176
|
+
}
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1138
1179
|
"currency": {
|
|
1139
1180
|
"multiple": false,
|
|
1140
1181
|
"required": true,
|
|
@@ -1216,6 +1257,16 @@
|
|
|
1216
1257
|
"type": "query",
|
|
1217
1258
|
"named": true,
|
|
1218
1259
|
"fields": {
|
|
1260
|
+
"comment": {
|
|
1261
|
+
"multiple": true,
|
|
1262
|
+
"required": false,
|
|
1263
|
+
"types": [
|
|
1264
|
+
{
|
|
1265
|
+
"type": "comment",
|
|
1266
|
+
"named": true
|
|
1267
|
+
}
|
|
1268
|
+
]
|
|
1269
|
+
},
|
|
1219
1270
|
"date": {
|
|
1220
1271
|
"multiple": false,
|
|
1221
1272
|
"required": true,
|
|
@@ -1330,7 +1381,7 @@
|
|
|
1330
1381
|
"named": true,
|
|
1331
1382
|
"fields": {
|
|
1332
1383
|
"comment": {
|
|
1333
|
-
"multiple":
|
|
1384
|
+
"multiple": true,
|
|
1334
1385
|
"required": false,
|
|
1335
1386
|
"types": [
|
|
1336
1387
|
{
|
|
@@ -1394,10 +1445,6 @@
|
|
|
1394
1445
|
"multiple": true,
|
|
1395
1446
|
"required": false,
|
|
1396
1447
|
"types": [
|
|
1397
|
-
{
|
|
1398
|
-
"type": "comment",
|
|
1399
|
-
"named": true
|
|
1400
|
-
},
|
|
1401
1448
|
{
|
|
1402
1449
|
"type": "key_value",
|
|
1403
1450
|
"named": true
|
|
@@ -1543,7 +1590,7 @@
|
|
|
1543
1590
|
"named": false
|
|
1544
1591
|
},
|
|
1545
1592
|
{
|
|
1546
|
-
"type": "
|
|
1593
|
+
"type": "NULL",
|
|
1547
1594
|
"named": false
|
|
1548
1595
|
},
|
|
1549
1596
|
{
|
|
@@ -1570,6 +1617,10 @@
|
|
|
1570
1617
|
"type": "close",
|
|
1571
1618
|
"named": false
|
|
1572
1619
|
},
|
|
1620
|
+
{
|
|
1621
|
+
"type": "comment",
|
|
1622
|
+
"named": true
|
|
1623
|
+
},
|
|
1573
1624
|
{
|
|
1574
1625
|
"type": "commodity",
|
|
1575
1626
|
"named": false
|
|
@@ -1602,6 +1653,10 @@
|
|
|
1602
1653
|
"type": "include",
|
|
1603
1654
|
"named": false
|
|
1604
1655
|
},
|
|
1656
|
+
{
|
|
1657
|
+
"type": "item",
|
|
1658
|
+
"named": true
|
|
1659
|
+
},
|
|
1605
1660
|
{
|
|
1606
1661
|
"type": "key",
|
|
1607
1662
|
"named": true
|