tree-sitter-beancount 2.1.0 → 2.1.2
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/.github/workflows/release.yml +2 -2
- package/CHANGELOG.md +17 -1
- package/Cargo.lock +59 -0
- package/Cargo.toml +1 -1
- package/README.md +5 -1
- package/bindings/rust/build.rs +0 -2
- package/grammar.js +130 -150
- package/package.json +1 -1
- package/src/grammar.json +257 -591
- package/src/node-types.json +276 -393
- package/src/parser.c +10783 -9798
- package/test/corpus/arithmetic.txt +21 -44
- package/test/corpus/comment.txt +5 -15
- package/test/corpus/currencies.txt +6 -12
- package/test/corpus/entry_types.txt +7 -20
- package/test/corpus/markdown_orgmode.txt +4 -8
- package/test/corpus/metadata.txt +76 -93
- package/test/corpus/multi_line.txt +2 -4
- package/test/corpus/parse_lots.txt +16 -110
- package/test/corpus/parser_links.txt +2 -4
- package/test/corpus/push_pop_meta.txt +3 -5
- package/test/corpus/transaction.txt +24 -46
- package/test/corpus/ugly_bugs.txt +2 -4
package/test/corpus/metadata.txt
CHANGED
|
@@ -12,11 +12,11 @@ metadata begin
|
|
|
12
12
|
(file
|
|
13
13
|
(transaction
|
|
14
14
|
(date)
|
|
15
|
-
(txn
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
(
|
|
15
|
+
(txn)
|
|
16
|
+
(narration)
|
|
17
|
+
(key_value
|
|
18
|
+
(key)
|
|
19
|
+
(value (string))
|
|
20
20
|
)
|
|
21
21
|
(posting
|
|
22
22
|
(account)
|
|
@@ -41,7 +41,6 @@ metadata begin
|
|
|
41
41
|
(currency)
|
|
42
42
|
)
|
|
43
43
|
)
|
|
44
|
-
)
|
|
45
44
|
)
|
|
46
45
|
)
|
|
47
46
|
|
|
@@ -59,9 +58,8 @@ metadata middle
|
|
|
59
58
|
(file
|
|
60
59
|
(transaction
|
|
61
60
|
(date)
|
|
62
|
-
(txn
|
|
63
|
-
(
|
|
64
|
-
(posting_or_kv_list
|
|
61
|
+
(txn)
|
|
62
|
+
(narration)
|
|
65
63
|
(posting
|
|
66
64
|
(account)
|
|
67
65
|
(incomplete_amount
|
|
@@ -76,8 +74,9 @@ metadata middle
|
|
|
76
74
|
)
|
|
77
75
|
)
|
|
78
76
|
)
|
|
79
|
-
(
|
|
80
|
-
(
|
|
77
|
+
(key_value
|
|
78
|
+
(key)
|
|
79
|
+
(value (string))
|
|
81
80
|
)
|
|
82
81
|
(posting
|
|
83
82
|
(account)
|
|
@@ -88,7 +87,6 @@ metadata middle
|
|
|
88
87
|
(currency)
|
|
89
88
|
)
|
|
90
89
|
)
|
|
91
|
-
)
|
|
92
90
|
)
|
|
93
91
|
)
|
|
94
92
|
|
|
@@ -106,9 +104,8 @@ metadata end
|
|
|
106
104
|
(file
|
|
107
105
|
(transaction
|
|
108
106
|
(date)
|
|
109
|
-
(txn
|
|
110
|
-
(
|
|
111
|
-
(posting_or_kv_list
|
|
107
|
+
(txn)
|
|
108
|
+
(narration)
|
|
112
109
|
(posting
|
|
113
110
|
(account)
|
|
114
111
|
(incomplete_amount
|
|
@@ -132,10 +129,10 @@ metadata end
|
|
|
132
129
|
(currency)
|
|
133
130
|
)
|
|
134
131
|
)
|
|
135
|
-
(
|
|
136
|
-
(
|
|
132
|
+
(key_value
|
|
133
|
+
(key)
|
|
134
|
+
(value (string))
|
|
137
135
|
)
|
|
138
|
-
)
|
|
139
136
|
)
|
|
140
137
|
)
|
|
141
138
|
|
|
@@ -157,11 +154,11 @@ metadata many
|
|
|
157
154
|
(file
|
|
158
155
|
(transaction
|
|
159
156
|
(date)
|
|
160
|
-
(txn
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
(
|
|
157
|
+
(txn)
|
|
158
|
+
(narration)
|
|
159
|
+
(key_value
|
|
160
|
+
(key)
|
|
161
|
+
(value (string))
|
|
165
162
|
)
|
|
166
163
|
(posting
|
|
167
164
|
(account)
|
|
@@ -177,11 +174,13 @@ metadata many
|
|
|
177
174
|
)
|
|
178
175
|
)
|
|
179
176
|
)
|
|
180
|
-
(
|
|
181
|
-
(
|
|
177
|
+
(key_value
|
|
178
|
+
(key)
|
|
179
|
+
(value (string))
|
|
182
180
|
)
|
|
183
|
-
(
|
|
184
|
-
(
|
|
181
|
+
(key_value
|
|
182
|
+
(key)
|
|
183
|
+
(value (string))
|
|
185
184
|
)
|
|
186
185
|
(posting
|
|
187
186
|
(account)
|
|
@@ -192,13 +191,14 @@ metadata many
|
|
|
192
191
|
(currency)
|
|
193
192
|
)
|
|
194
193
|
)
|
|
195
|
-
(
|
|
196
|
-
(
|
|
194
|
+
(key_value
|
|
195
|
+
(key)
|
|
196
|
+
(value (string))
|
|
197
197
|
)
|
|
198
|
-
(
|
|
199
|
-
(
|
|
198
|
+
(key_value
|
|
199
|
+
(key)
|
|
200
|
+
(value (string))
|
|
200
201
|
)
|
|
201
|
-
)
|
|
202
202
|
)
|
|
203
203
|
)
|
|
204
204
|
|
|
@@ -221,10 +221,9 @@ metadata indented
|
|
|
221
221
|
(file
|
|
222
222
|
(transaction
|
|
223
223
|
(date)
|
|
224
|
-
(txn
|
|
225
|
-
(
|
|
226
|
-
|
|
227
|
-
(key_value_line (key_value (key) (string)))
|
|
224
|
+
(txn)
|
|
225
|
+
(narration)
|
|
226
|
+
(key_value (key) (value (string)))
|
|
228
227
|
(posting
|
|
229
228
|
(account)
|
|
230
229
|
(incomplete_amount
|
|
@@ -239,11 +238,13 @@ metadata indented
|
|
|
239
238
|
)
|
|
240
239
|
)
|
|
241
240
|
)
|
|
242
|
-
(
|
|
243
|
-
(
|
|
241
|
+
(key_value
|
|
242
|
+
(key)
|
|
243
|
+
(value (string))
|
|
244
244
|
)
|
|
245
|
-
(
|
|
246
|
-
(
|
|
245
|
+
(key_value
|
|
246
|
+
(key)
|
|
247
|
+
(value (string))
|
|
247
248
|
)
|
|
248
249
|
(posting
|
|
249
250
|
(account)
|
|
@@ -254,16 +255,18 @@ metadata indented
|
|
|
254
255
|
(currency)
|
|
255
256
|
)
|
|
256
257
|
)
|
|
257
|
-
(
|
|
258
|
-
(
|
|
258
|
+
(key_value
|
|
259
|
+
(key)
|
|
260
|
+
(value (string))
|
|
259
261
|
)
|
|
260
|
-
(
|
|
261
|
-
(
|
|
262
|
+
(key_value
|
|
263
|
+
(key)
|
|
264
|
+
(value (string))
|
|
262
265
|
)
|
|
263
|
-
(
|
|
264
|
-
(
|
|
266
|
+
(key_value
|
|
267
|
+
(key)
|
|
268
|
+
(value (string))
|
|
265
269
|
)
|
|
266
|
-
)
|
|
267
270
|
)
|
|
268
271
|
)
|
|
269
272
|
|
|
@@ -300,33 +303,25 @@ metadata other
|
|
|
300
303
|
(open
|
|
301
304
|
(date)
|
|
302
305
|
(account)
|
|
303
|
-
|
|
304
|
-
(
|
|
305
|
-
(key_value_line (key_value (key) (string)))
|
|
306
|
-
)
|
|
306
|
+
(key_value (key) (value (string)))
|
|
307
|
+
(key_value (key) (value (string)))
|
|
307
308
|
)
|
|
308
309
|
(close
|
|
309
310
|
(date)
|
|
310
311
|
(account)
|
|
311
|
-
|
|
312
|
-
(key_value_line (key_value (key) (string)))
|
|
313
|
-
)
|
|
312
|
+
(key_value (key) (value (string)))
|
|
314
313
|
)
|
|
315
314
|
(note
|
|
316
315
|
(date)
|
|
317
316
|
(account)
|
|
318
317
|
(string)
|
|
319
|
-
|
|
320
|
-
(key_value_line (key_value (key) (string)))
|
|
321
|
-
)
|
|
318
|
+
(key_value (key) (value (string)))
|
|
322
319
|
)
|
|
323
320
|
(pad
|
|
324
321
|
(date)
|
|
325
322
|
(account)
|
|
326
323
|
(account)
|
|
327
|
-
|
|
328
|
-
(key_value_line (key_value (key) (string)))
|
|
329
|
-
)
|
|
324
|
+
(key_value (key) (value (string)))
|
|
330
325
|
)
|
|
331
326
|
(balance
|
|
332
327
|
(date)
|
|
@@ -335,25 +330,19 @@ metadata other
|
|
|
335
330
|
(number)
|
|
336
331
|
(currency)
|
|
337
332
|
)
|
|
338
|
-
|
|
339
|
-
(key_value_line (key_value (key) (string)))
|
|
340
|
-
)
|
|
333
|
+
(key_value (key) (value (string)))
|
|
341
334
|
)
|
|
342
335
|
(event
|
|
343
336
|
(date)
|
|
344
337
|
(string)
|
|
345
338
|
(string)
|
|
346
|
-
|
|
347
|
-
(key_value_line (key_value (key) (string)))
|
|
348
|
-
)
|
|
339
|
+
(key_value (key) (value (string)))
|
|
349
340
|
)
|
|
350
341
|
(document
|
|
351
342
|
(date)
|
|
352
343
|
(account)
|
|
353
344
|
(filename (string))
|
|
354
|
-
|
|
355
|
-
(key_value_line (key_value (key) (string)))
|
|
356
|
-
)
|
|
345
|
+
(key_value (key) (value (string)))
|
|
357
346
|
)
|
|
358
347
|
(price
|
|
359
348
|
(date)
|
|
@@ -362,9 +351,7 @@ metadata other
|
|
|
362
351
|
(number)
|
|
363
352
|
(currency)
|
|
364
353
|
)
|
|
365
|
-
|
|
366
|
-
(key_value_line (key_value (key) (string)))
|
|
367
|
-
)
|
|
354
|
+
(key_value (key) (value (string)))
|
|
368
355
|
)
|
|
369
356
|
)
|
|
370
357
|
|
|
@@ -388,19 +375,17 @@ metadata datatypes
|
|
|
388
375
|
(file
|
|
389
376
|
(transaction
|
|
390
377
|
(date)
|
|
391
|
-
(txn
|
|
392
|
-
(
|
|
393
|
-
|
|
394
|
-
(
|
|
395
|
-
(
|
|
396
|
-
(
|
|
397
|
-
(
|
|
398
|
-
(
|
|
399
|
-
(
|
|
400
|
-
(
|
|
401
|
-
(
|
|
402
|
-
(key_value_line (key_value (key) (bool)))
|
|
403
|
-
)
|
|
378
|
+
(txn)
|
|
379
|
+
(narration)
|
|
380
|
+
(key_value (key) (value (string)))
|
|
381
|
+
(key_value (key) (value (account)))
|
|
382
|
+
(key_value (key) (value (date)))
|
|
383
|
+
(key_value (key) (value (currency)))
|
|
384
|
+
(key_value (key) (value (tag)))
|
|
385
|
+
(key_value (key) (value (number)))
|
|
386
|
+
(key_value (key) (value (amount (number) (currency))))
|
|
387
|
+
(key_value (key) (value (bool)))
|
|
388
|
+
(key_value (key) (value (bool)))
|
|
404
389
|
)
|
|
405
390
|
)
|
|
406
391
|
|
|
@@ -419,13 +404,11 @@ metadata key syntax
|
|
|
419
404
|
(file
|
|
420
405
|
(transaction
|
|
421
406
|
(date)
|
|
422
|
-
(txn
|
|
423
|
-
(
|
|
424
|
-
|
|
425
|
-
(
|
|
426
|
-
(
|
|
427
|
-
(
|
|
428
|
-
(key_value_line (key_value (key) (string)))
|
|
429
|
-
)
|
|
407
|
+
(txn)
|
|
408
|
+
(narration)
|
|
409
|
+
(key_value (key) (value (string)))
|
|
410
|
+
(key_value (key) (value (string)))
|
|
411
|
+
(key_value (key) (value (string)))
|
|
412
|
+
(key_value (key) (value (string)))
|
|
430
413
|
)
|
|
431
414
|
)
|
|
@@ -13,9 +13,8 @@ and why not another!"
|
|
|
13
13
|
(file
|
|
14
14
|
(transaction
|
|
15
15
|
(date)
|
|
16
|
-
(txn
|
|
17
|
-
(
|
|
18
|
-
(posting_or_kv_list
|
|
16
|
+
(txn)
|
|
17
|
+
(narration)
|
|
19
18
|
(posting
|
|
20
19
|
(account)
|
|
21
20
|
(incomplete_amount (number) (currency))
|
|
@@ -24,6 +23,5 @@ and why not another!"
|
|
|
24
23
|
(account)
|
|
25
24
|
(incomplete_amount (unary_number_expr (minus) (number)) (currency))
|
|
26
25
|
)
|
|
27
|
-
)
|
|
28
26
|
)
|
|
29
27
|
)
|