tree-sitter-beancount 2.3.3 → 2.4.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.
Files changed (51) hide show
  1. package/README.md +334 -4
  2. package/binding.gyp +17 -7
  3. package/bindings/node/binding.cc +14 -22
  4. package/bindings/node/index.d.ts +28 -0
  5. package/bindings/node/index.js +3 -15
  6. package/grammar.js +38 -125
  7. package/package.json +35 -5
  8. package/prebuilds/darwin-arm64/tree-sitter-beancount.node +0 -0
  9. package/prebuilds/darwin-x64/tree-sitter-beancount.node +0 -0
  10. package/prebuilds/linux-arm64/tree-sitter-beancount.node +0 -0
  11. package/prebuilds/linux-x64/tree-sitter-beancount.node +0 -0
  12. package/prebuilds/win32-arm64/tree-sitter-beancount.node +0 -0
  13. package/prebuilds/win32-x64/tree-sitter-beancount.node +0 -0
  14. package/src/grammar.json +149 -560
  15. package/src/node-types.json +10 -11
  16. package/src/parser.c +7615 -9089
  17. package/src/scanner.c +345 -67
  18. package/src/tree_sitter/alloc.h +54 -0
  19. package/src/tree_sitter/array.h +291 -0
  20. package/src/tree_sitter/parser.h +68 -12
  21. package/.clang-format +0 -20
  22. package/.envrc +0 -1
  23. package/.gitattributes +0 -6
  24. package/.github/dependabot.yml +0 -26
  25. package/.github/workflows/cicd.yml +0 -30
  26. package/.github/workflows/release.yml +0 -72
  27. package/CHANGELOG.md +0 -80
  28. package/Cargo.lock +0 -71
  29. package/Cargo.toml +0 -26
  30. package/Package.swift +0 -20
  31. package/bindings/rust/build.rs +0 -39
  32. package/bindings/rust/lib.rs +0 -52
  33. package/flake.lock +0 -141
  34. package/flake.nix +0 -120
  35. package/test/corpus/arithmetic.txt +0 -373
  36. package/test/corpus/comment.txt +0 -992
  37. package/test/corpus/currencies.txt +0 -66
  38. package/test/corpus/entry_types.txt +0 -389
  39. package/test/corpus/markdown_orgmode.txt +0 -60
  40. package/test/corpus/metadata.txt +0 -414
  41. package/test/corpus/multi_line.txt +0 -27
  42. package/test/corpus/orgmode_sections.txt +0 -53
  43. package/test/corpus/parse_lots.txt +0 -417
  44. package/test/corpus/parser_include.txt +0 -23
  45. package/test/corpus/parser_links.txt +0 -32
  46. package/test/corpus/parser_options.txt +0 -39
  47. package/test/corpus/parser_plugin.txt +0 -35
  48. package/test/corpus/push_pop_meta.txt +0 -34
  49. package/test/corpus/push_pop_tag.txt +0 -23
  50. package/test/corpus/transaction.txt +0 -224
  51. package/test/corpus/ugly_bugs.txt +0 -91
@@ -1,224 +0,0 @@
1
- =============
2
- no narration
3
- =============
4
-
5
- 2013-05-18 *
6
- Expenses:Restaurant 100 USD
7
- Assets:US:Cash -100 USD
8
-
9
- ---
10
-
11
- (file
12
- (transaction
13
- (date)
14
- (txn)
15
- (posting
16
- (account)
17
- (incomplete_amount (number) (currency))
18
- )
19
- (posting
20
- (account)
21
- (incomplete_amount (unary_number_expr (minus) (number)) (currency))
22
- )
23
- )
24
- )
25
-
26
- ==============
27
- tag then link
28
- ==============
29
-
30
- 2014-04-20 * "Money from CC" ^610fa7f17e7a #trip
31
- Expenses:Restaurant 100 USD
32
- Assets:US:Cash -100 USD
33
-
34
- ---
35
-
36
- (file
37
- (transaction
38
- (date)
39
- (txn)
40
- (narration)
41
- (tags_links (link) (tag))
42
- (posting
43
- (account)
44
- (incomplete_amount (number) (currency))
45
- )
46
- (posting
47
- (account)
48
- (incomplete_amount (unary_number_expr (minus) (number)) (currency))
49
- )
50
- )
51
- )
52
-
53
- ==============
54
- link then tag
55
- ==============
56
-
57
- 2014-04-20 * "Money from CC" #trip ^610fa7f17e7a
58
- Expenses:Restaurant 100 USD
59
- Assets:US:Cash -100 USD
60
-
61
- ----
62
-
63
- (file
64
- (transaction
65
- (date)
66
- (txn)
67
- (narration)
68
- (tags_links (tag) (link))
69
- (posting
70
- (account)
71
- (incomplete_amount (number) (currency))
72
- )
73
- (posting
74
- (account)
75
- (incomplete_amount (unary_number_expr (minus) (number)) (currency))
76
- )
77
- )
78
- )
79
-
80
-
81
- ============
82
- zero prices
83
- ============
84
-
85
- 2014-04-20 * "Like a conversion entry"
86
- Equity:Conversions 100 USD @ 0 XFER
87
- Equity:Conversions 101 CAD @ 0 XFER
88
- Equity:Conversions 102 AUD @ 0 XFER
89
-
90
- ---
91
-
92
- (file
93
- (transaction
94
- (date)
95
- (txn)
96
- (narration)
97
- (posting
98
- (account)
99
- (incomplete_amount (number) (currency))
100
- (at)
101
- (price_annotation (incomplete_amount (number) (currency)))
102
- )
103
- (posting
104
- (account)
105
- (incomplete_amount (number) (currency))
106
- (at)
107
- (price_annotation (incomplete_amount (number) (currency)))
108
- )
109
- (posting
110
- (account)
111
- (incomplete_amount (number) (currency))
112
- (at)
113
- (price_annotation (incomplete_amount (number) (currency)))
114
- )
115
- )
116
- )
117
-
118
- ===========
119
- zero units
120
- ===========
121
-
122
- 2014-04-20 * "Zero number of units"
123
- Assets:Investment 0 HOOL {500.00 USD}
124
- Assets:Cash 0 USD
125
-
126
- ---
127
-
128
- (file
129
- (transaction
130
- (date)
131
- (txn)
132
- (narration)
133
- (posting
134
- (account)
135
- (incomplete_amount (number) (currency))
136
- (cost_spec
137
- (cost_comp (compound_amount (number) (currency)))
138
- )
139
- )
140
- (posting
141
- (account)
142
- (incomplete_amount (number) (currency))
143
- )
144
- )
145
- )
146
-
147
- ===========
148
- zero costs
149
- ===========
150
-
151
- 2014-04-20 * "Like a conversion entry"
152
- Assets:Investment 10 HOOL {0 USD}
153
- Assets:Cash 0 USD
154
-
155
- ---
156
-
157
- (file
158
- (transaction
159
- (date)
160
- (txn)
161
- (narration)
162
- (posting
163
- (account)
164
- (incomplete_amount (number) (currency))
165
- (cost_spec
166
- (cost_comp (compound_amount (number) (currency)))
167
- )
168
- )
169
- (posting
170
- (account)
171
- (incomplete_amount (number) (currency))
172
- )
173
- )
174
- )
175
-
176
- ============
177
- no postings
178
- ============
179
-
180
- 2014-07-17 * "(JRN) INTRA-ACCOUNT TRANSFER" ^795422780
181
-
182
- ---
183
-
184
- (file
185
- (transaction
186
- (date)
187
- (txn)
188
- (narration)
189
- (tags_links (link))
190
- )
191
- )
192
-
193
- ======================
194
- tags after first line
195
- ======================
196
-
197
- 2014-04-20 * "Links and tags on subsequent lines" #basetag ^baselink
198
- #tag1 #tag2
199
- ^link1 #tag3
200
- #tag4 ^link2
201
- ^link3 ^link4
202
- #tag6
203
- ^link5
204
- Assets:Checking 100 USD
205
- Assets:Checking -99 USD
206
-
207
- ---
208
-
209
- (file
210
- (transaction
211
- (date)
212
- (txn)
213
- (narration)
214
- (tags_links (tag) (link))
215
- (tags_links (tag) (tag))
216
- (tags_links (link) (tag))
217
- (tags_links (tag) (link))
218
- (tags_links (link) (link))
219
- (tags_links (tag))
220
- (tags_links (link))
221
- (posting (account) (incomplete_amount (number) (currency)))
222
- (posting (account) (incomplete_amount (unary_number_expr (minus) (number)) (currency)))
223
- )
224
- )
@@ -1,91 +0,0 @@
1
- =================
2
- extra whitespace
3
- =================
4
-
5
-
6
- 2013-07-11 note Assets:Cash "test"
7
-
8
-
9
- ;;
10
-
11
-
12
- ---
13
-
14
- (file
15
- (note
16
- (date)
17
- (account)
18
- (string)
19
- )
20
- (comment)
21
- )
22
-
23
- =============================
24
- extra whitespace transaction
25
- =============================
26
-
27
- 2013-05-18 * "Nice dinner at Mermaid Inn"
28
- Expenses:Restaurant 100 USD
29
- Assets:US:Cash
30
-
31
- ;; End of file',
32
-
33
- ---
34
-
35
- (file
36
- (transaction
37
- (date)
38
- (txn)
39
- (narration)
40
- (posting
41
- (account)
42
- (incomplete_amount
43
- (number)
44
- (currency)
45
- )
46
- )
47
- (posting
48
- (account)
49
- )
50
- )
51
- (comment)
52
- )
53
-
54
- ===========================
55
- embedded quotes in strings
56
- ===========================
57
-
58
-
59
- 2013-07-11 note Assets:Cash "\"test\""
60
-
61
- 2013-07-11 * "\"Groups\"" "\"Some things\""
62
- reference: "\"test\""
63
- Assets:Cash -50 USD
64
- Expenses:FIXME
65
-
66
- ---
67
-
68
- (file
69
- (note
70
- (date)
71
- (account)
72
- (string)
73
- )
74
- (transaction
75
- (date)
76
- (txn)
77
- (payee)
78
- (narration)
79
- (key_value
80
- (key)
81
- (value
82
- (string)))
83
- (posting
84
- (account)
85
- (incomplete_amount
86
- (unary_number_expr
87
- (minus)
88
- (number))
89
- (currency)))
90
- (posting
91
- (account))))