beancount-ast 0.0.1a3__tar.gz → 0.0.1a4__tar.gz

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 (24) hide show
  1. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.github/renovate.json +0 -6
  2. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.gitignore +1 -0
  3. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.pre-commit-config.yaml +2 -2
  4. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/AGENTS.md +12 -11
  5. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/Cargo.lock +171 -90
  6. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/Cargo.toml +2 -2
  7. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/PKG-INFO +1 -1
  8. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/py-src/beancount_ast/__init__.py +6 -2
  9. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/py-src/beancount_ast/_ast.pyi +44 -59
  10. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/py-src/beancount_ast/_directive.py +2 -3
  11. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/pyproject.toml +3 -3
  12. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/src/lib.rs +121 -110
  13. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/tests/__snapshots__/test_parse_snapshots.ambr +3 -15
  14. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/tests/test_parse_snapshots.py +0 -9
  15. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.github/workflows/_build_wheels.yaml +0 -0
  16. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.github/workflows/autofix.yaml +0 -0
  17. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.github/workflows/ci.yml +0 -0
  18. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.github/workflows/release.yaml +0 -0
  19. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/.github/workflows/tests.yml +0 -0
  20. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/README.md +0 -0
  21. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/dprint.json +0 -0
  22. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/py-src/beancount_ast/py.typed +0 -0
  23. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/taskfile.yaml +0 -0
  24. {beancount_ast-0.0.1a3 → beancount_ast-0.0.1a4}/tests/__init__.py +0 -0
@@ -18,12 +18,6 @@
18
18
  "requires-python"
19
19
  ],
20
20
  "enabled": false
21
- },
22
- {
23
- "matchDepNames": [
24
- "beancount-parser"
25
- ],
26
- "enabled": false
27
21
  }
28
22
  ]
29
23
  }
@@ -27,3 +27,4 @@ experiments/v3/arrow/*.arrow
27
27
  .env
28
28
  target
29
29
  uv.lock
30
+ .envrc
@@ -15,7 +15,7 @@ repos:
15
15
  always_run: true
16
16
 
17
17
  - repo: https://github.com/abravalheri/validate-pyproject
18
- rev: v0.24.1
18
+ rev: v0.25
19
19
  hooks:
20
20
  - id: validate-pyproject
21
21
  language: python
@@ -57,7 +57,7 @@ repos:
57
57
 
58
58
  - repo: https://github.com/astral-sh/ruff-pre-commit
59
59
  # Ruff version.
60
- rev: v0.14.14
60
+ rev: v0.15.0
61
61
  hooks:
62
62
  # Run the linter.
63
63
  - id: ruff
@@ -5,32 +5,33 @@
5
5
  - The Python API intentionally exposes the **parser AST** (directives + spans + raw tokens), not Beancount’s semantic `beancount.core` model.
6
6
 
7
7
  ## Key layout
8
- - `src/lib.rs`: the PyO3 module `beancount_ast._ast`.
8
+ - `src/lib.rs`: PyO3 module `beancount_ast._ast`.
9
9
  - Registers all exposed Python classes in `#[pymodule(name = "_ast")]`.
10
- - Converts Rust parser nodes (`beancount_parser::ast::*`) into `Py*` structs.
11
- - Public Python entrypoints are `parse_string` and `parse_file`.
12
- - `py-src/beancount_ast/__init__.py`: re-exports symbols from `beancount_ast._ast`.
13
- - `py-src/beancount_ast/__init__.pyi`: provide stubs to downstream users. then real type-stubs of `beancount_ast._ast`.
14
- - `tests/test_parse_snapshots.py`: snapshot-style API tests using `pytest` + `syrupy`.
10
+ - Converts `beancount_parser::ast::*` nodes into `Py*` wrappers.
11
+ - Exposes `parse_string` and `parse_file` to Python.
12
+ - `py-src/beancount_ast/__init__.py`: re-exports compiled `_ast` symbols and the `Directive` ABC for consumers.
13
+ - `py-src/beancount_ast/_directive.py`: defines the `Directive` ABC and registers all directive classes.
14
+ - `py-src/beancount_ast/_ast.pyi`: canonical type stubs mirroring the compiled `beancount_ast._ast` extension.
15
+ - `tests/test_parse_snapshots.py`: snapshot-style API tests (`pytest` + `syrupy`).
15
16
 
16
17
  ## Workflows (local + CI-aligned)
17
- - Python deps / test env are managed with `uv` (see `.github/workflows/tests.yml`).
18
+ - Running python tests.
18
19
  - Setup: `uv sync --dev --no-install-project`
19
- - Run tests: `uv run pytest`
20
+ - Re-build module after any rust code change: `maturin develop --locked --release --uv -v`
21
+ - Run tests: `pytest`
20
22
  - Rust checks mirror CI (`.github/workflows/ci.yml`):
21
23
  - Format: `cargo fmt --all -- --check`
22
24
  - Lint: `cargo clippy --workspace --all-targets --all-features -- -D warnings`
23
25
 
24
26
  ## Conventions to follow when changing Rust bindings
25
- - Avoid `unwrap()` / `expect()`; the crate denies them (`src/lib.rs` has `#![deny(clippy::unwrap_used, clippy::expect_used)]`).
27
+ - Avoid `unwrap()` / `expect()` / `unwrap_of_default()`; the crate denies them (`src/lib.rs` has `#![deny(clippy::unwrap_used, clippy::expect_used)]`), the error should be propagated to caller.
26
28
  - Python-facing data structures are thin, mostly immutable “record” types:
27
29
  - Define a `Py*` struct with `#[pyclass(..., get_all)]` and `pyderive` derives (`PyNew`, `PyRepr`, `PyStr`, and sometimes `PyEq`).
28
- - If the type should appear in stubs, add `#[cfg_attr(feature = "stub-gen", ...gen_stub_pyclass)]`.
30
+ - when you update rust code, you should also update type stub.
29
31
  - When adding a new directive/type:
30
32
  1) Add the `Py*` struct.
31
33
  2) Register it in the `_ast` module init.
32
34
  3) Extend the conversion layer (e.g. `directive_to_py(...)`).
33
- 4) Update the `Directive` type alias used for stubs (see the `stub-gen` block at the end of `src/lib.rs`).
34
35
 
35
36
  ## Formatting / linting
36
37
  - Non-code config formatting uses `dprint` (see `dprint.json`) and is enforced via pre-commit.
@@ -22,12 +22,27 @@ dependencies = [
22
22
  "memchr",
23
23
  ]
24
24
 
25
+ [[package]]
26
+ name = "allocator-api2"
27
+ version = "0.2.21"
28
+ source = "registry+https://github.com/rust-lang/crates.io-index"
29
+ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
30
+
25
31
  [[package]]
26
32
  name = "anyhow"
27
33
  version = "1.0.100"
28
34
  source = "registry+https://github.com/rust-lang/crates.io-index"
29
35
  checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
30
36
 
37
+ [[package]]
38
+ name = "ar_archive_writer"
39
+ version = "0.5.1"
40
+ source = "registry+https://github.com/rust-lang/crates.io-index"
41
+ checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b"
42
+ dependencies = [
43
+ "object",
44
+ ]
45
+
31
46
  [[package]]
32
47
  name = "arrayvec"
33
48
  version = "0.7.6"
@@ -52,27 +67,16 @@ dependencies = [
52
67
  [[package]]
53
68
  name = "beancount-parser"
54
69
  version = "3.3.0-alpha.0"
55
- source = "git+https://github.com/trim21/beancount.git?rev=8b4e3311258194fe3127862dd4132028e97cc01d#8b4e3311258194fe3127862dd4132028e97cc01d"
70
+ source = "git+https://github.com/trim21/beancount.git?rev=70c986d417ba320486b5eb6efaea9d82821620c4#70c986d417ba320486b5eb6efaea9d82821620c4"
56
71
  dependencies = [
57
72
  "anyhow",
58
- "beancount-tree-sitter",
59
73
  "chrono",
74
+ "chumsky",
60
75
  "path-clean",
61
76
  "ropey",
62
77
  "rust_decimal",
63
78
  "serde_json",
64
79
  "smallvec",
65
- "tree-sitter",
66
- ]
67
-
68
- [[package]]
69
- name = "beancount-tree-sitter"
70
- version = "2.4.2"
71
- source = "git+https://github.com/trim21/beancount.git?rev=8b4e3311258194fe3127862dd4132028e97cc01d#8b4e3311258194fe3127862dd4132028e97cc01d"
72
- dependencies = [
73
- "cc",
74
- "tree-sitter",
75
- "tree-sitter-language",
76
80
  ]
77
81
 
78
82
  [[package]]
@@ -140,9 +144,9 @@ dependencies = [
140
144
 
141
145
  [[package]]
142
146
  name = "bytes"
143
- version = "1.11.0"
147
+ version = "1.11.1"
144
148
  source = "registry+https://github.com/rust-lang/crates.io-index"
145
- checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
149
+ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
146
150
 
147
151
  [[package]]
148
152
  name = "cc"
@@ -175,6 +179,20 @@ dependencies = [
175
179
  "num-traits",
176
180
  ]
177
181
 
182
+ [[package]]
183
+ name = "chumsky"
184
+ version = "0.12.0"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "4ba4a05c9ce83b07de31b31c874e87c069881ac4355db9e752e3a55c11ec75a6"
187
+ dependencies = [
188
+ "hashbrown 0.15.5",
189
+ "regex-automata",
190
+ "serde",
191
+ "stacker",
192
+ "unicode-ident",
193
+ "unicode-segmentation",
194
+ ]
195
+
178
196
  [[package]]
179
197
  name = "equivalent"
180
198
  version = "1.0.2"
@@ -187,6 +205,12 @@ version = "0.1.9"
187
205
  source = "registry+https://github.com/rust-lang/crates.io-index"
188
206
  checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
189
207
 
208
+ [[package]]
209
+ name = "foldhash"
210
+ version = "0.1.5"
211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
212
+ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
213
+
190
214
  [[package]]
191
215
  name = "funty"
192
216
  version = "2.0.0"
@@ -213,6 +237,17 @@ dependencies = [
213
237
  "ahash",
214
238
  ]
215
239
 
240
+ [[package]]
241
+ name = "hashbrown"
242
+ version = "0.15.5"
243
+ source = "registry+https://github.com/rust-lang/crates.io-index"
244
+ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
245
+ dependencies = [
246
+ "allocator-api2",
247
+ "equivalent",
248
+ "foldhash",
249
+ ]
250
+
216
251
  [[package]]
217
252
  name = "hashbrown"
218
253
  version = "0.16.1"
@@ -235,15 +270,6 @@ dependencies = [
235
270
  "hashbrown 0.16.1",
236
271
  ]
237
272
 
238
- [[package]]
239
- name = "indoc"
240
- version = "2.0.7"
241
- source = "registry+https://github.com/rust-lang/crates.io-index"
242
- checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
243
- dependencies = [
244
- "rustversion",
245
- ]
246
-
247
273
  [[package]]
248
274
  name = "inventory"
249
275
  version = "0.3.21"
@@ -282,21 +308,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
282
308
  checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
283
309
 
284
310
  [[package]]
285
- name = "memoffset"
286
- version = "0.9.1"
311
+ name = "num-traits"
312
+ version = "0.2.19"
287
313
  source = "registry+https://github.com/rust-lang/crates.io-index"
288
- checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
314
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
289
315
  dependencies = [
290
316
  "autocfg",
291
317
  ]
292
318
 
293
319
  [[package]]
294
- name = "num-traits"
295
- version = "0.2.19"
320
+ name = "object"
321
+ version = "0.37.3"
296
322
  source = "registry+https://github.com/rust-lang/crates.io-index"
297
- checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
323
+ checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
298
324
  dependencies = [
299
- "autocfg",
325
+ "memchr",
300
326
  ]
301
327
 
302
328
  [[package]]
@@ -344,6 +370,16 @@ dependencies = [
344
370
  "unicode-ident",
345
371
  ]
346
372
 
373
+ [[package]]
374
+ name = "psm"
375
+ version = "0.1.29"
376
+ source = "registry+https://github.com/rust-lang/crates.io-index"
377
+ checksum = "1fa96cb91275ed31d6da3e983447320c4eb219ac180fa1679a0889ff32861e2d"
378
+ dependencies = [
379
+ "ar_archive_writer",
380
+ "cc",
381
+ ]
382
+
347
383
  [[package]]
348
384
  name = "ptr_meta"
349
385
  version = "0.1.4"
@@ -387,27 +423,24 @@ dependencies = [
387
423
 
388
424
  [[package]]
389
425
  name = "pyo3"
390
- version = "0.27.2"
426
+ version = "0.28.0"
391
427
  source = "registry+https://github.com/rust-lang/crates.io-index"
392
- checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d"
428
+ checksum = "fcf3ccafdf54c050be48a3a086d372f77ba6615f5057211607cd30e5ac5cec6d"
393
429
  dependencies = [
394
- "indoc",
395
430
  "inventory",
396
431
  "libc",
397
- "memoffset",
398
432
  "once_cell",
399
433
  "portable-atomic",
400
434
  "pyo3-build-config",
401
435
  "pyo3-ffi",
402
436
  "pyo3-macros",
403
- "unindent",
404
437
  ]
405
438
 
406
439
  [[package]]
407
440
  name = "pyo3-build-config"
408
- version = "0.27.2"
441
+ version = "0.28.0"
409
442
  source = "registry+https://github.com/rust-lang/crates.io-index"
410
- checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6"
443
+ checksum = "972720a441c91fd9c49f212a1d2d74c6e3803b231ebc8d66c51efbd7ccab11c8"
411
444
  dependencies = [
412
445
  "python3-dll-a",
413
446
  "target-lexicon",
@@ -415,9 +448,9 @@ dependencies = [
415
448
 
416
449
  [[package]]
417
450
  name = "pyo3-ffi"
418
- version = "0.27.2"
451
+ version = "0.28.0"
419
452
  source = "registry+https://github.com/rust-lang/crates.io-index"
420
- checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089"
453
+ checksum = "5994456d9dab8934d600d3867571b6410f24fbd6002570ad56356733eb54859b"
421
454
  dependencies = [
422
455
  "libc",
423
456
  "pyo3-build-config",
@@ -425,9 +458,9 @@ dependencies = [
425
458
 
426
459
  [[package]]
427
460
  name = "pyo3-macros"
428
- version = "0.27.2"
461
+ version = "0.28.0"
429
462
  source = "registry+https://github.com/rust-lang/crates.io-index"
430
- checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02"
463
+ checksum = "11ce9cc8d81b3c4969748807604d92b4eef363c5bb82b1a1bdb34ec6f1093a18"
431
464
  dependencies = [
432
465
  "proc-macro2",
433
466
  "pyo3-macros-backend",
@@ -437,9 +470,9 @@ dependencies = [
437
470
 
438
471
  [[package]]
439
472
  name = "pyo3-macros-backend"
440
- version = "0.27.2"
473
+ version = "0.28.0"
441
474
  source = "registry+https://github.com/rust-lang/crates.io-index"
442
- checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9"
475
+ checksum = "eaf4b60036a154d23282679b658e3cc7d88d3b8c9a40b43824785f232d2e1b98"
443
476
  dependencies = [
444
477
  "heck",
445
478
  "proc-macro2",
@@ -502,23 +535,11 @@ dependencies = [
502
535
  "getrandom",
503
536
  ]
504
537
 
505
- [[package]]
506
- name = "regex"
507
- version = "1.12.2"
508
- source = "registry+https://github.com/rust-lang/crates.io-index"
509
- checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
510
- dependencies = [
511
- "aho-corasick",
512
- "memchr",
513
- "regex-automata",
514
- "regex-syntax",
515
- ]
516
-
517
538
  [[package]]
518
539
  name = "regex-automata"
519
- version = "0.4.13"
540
+ version = "0.3.9"
520
541
  source = "registry+https://github.com/rust-lang/crates.io-index"
521
- checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
542
+ checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9"
522
543
  dependencies = [
523
544
  "aho-corasick",
524
545
  "memchr",
@@ -527,9 +548,9 @@ dependencies = [
527
548
 
528
549
  [[package]]
529
550
  name = "regex-syntax"
530
- version = "0.8.8"
551
+ version = "0.7.5"
531
552
  source = "registry+https://github.com/rust-lang/crates.io-index"
532
- checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
553
+ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
533
554
 
534
555
  [[package]]
535
556
  name = "rend"
@@ -614,6 +635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
614
635
  checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
615
636
  dependencies = [
616
637
  "serde_core",
638
+ "serde_derive",
617
639
  ]
618
640
 
619
641
  [[package]]
@@ -642,7 +664,6 @@ version = "1.0.149"
642
664
  source = "registry+https://github.com/rust-lang/crates.io-index"
643
665
  checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
644
666
  dependencies = [
645
- "indexmap",
646
667
  "itoa",
647
668
  "memchr",
648
669
  "serde",
@@ -669,16 +690,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
669
690
  checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
670
691
 
671
692
  [[package]]
672
- name = "str_indices"
673
- version = "0.4.4"
693
+ name = "stacker"
694
+ version = "0.1.22"
674
695
  source = "registry+https://github.com/rust-lang/crates.io-index"
675
- checksum = "d08889ec5408683408db66ad89e0e1f93dff55c73a4ccc71c427d5b277ee47e6"
696
+ checksum = "e1f8b29fb42aafcea4edeeb6b2f2d7ecd0d969c48b4cf0d2e64aafc471dd6e59"
697
+ dependencies = [
698
+ "cc",
699
+ "cfg-if",
700
+ "libc",
701
+ "psm",
702
+ "windows-sys",
703
+ ]
676
704
 
677
705
  [[package]]
678
- name = "streaming-iterator"
679
- version = "0.1.9"
706
+ name = "str_indices"
707
+ version = "0.4.4"
680
708
  source = "registry+https://github.com/rust-lang/crates.io-index"
681
- checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520"
709
+ checksum = "d08889ec5408683408db66ad89e0e1f93dff55c73a4ccc71c427d5b277ee47e6"
682
710
 
683
711
  [[package]]
684
712
  name = "syn"
@@ -759,26 +787,6 @@ dependencies = [
759
787
  "winnow",
760
788
  ]
761
789
 
762
- [[package]]
763
- name = "tree-sitter"
764
- version = "0.26.3"
765
- source = "registry+https://github.com/rust-lang/crates.io-index"
766
- checksum = "974d205cc395652cfa8b37daa053fe56eebd429acf8dc055503fee648dae981e"
767
- dependencies = [
768
- "cc",
769
- "regex",
770
- "regex-syntax",
771
- "serde_json",
772
- "streaming-iterator",
773
- "tree-sitter-language",
774
- ]
775
-
776
- [[package]]
777
- name = "tree-sitter-language"
778
- version = "0.1.6"
779
- source = "registry+https://github.com/rust-lang/crates.io-index"
780
- checksum = "4ae62f7eae5eb549c71b76658648b72cc6111f2d87d24a1e31fa907f4943e3ce"
781
-
782
790
  [[package]]
783
791
  name = "unicode-ident"
784
792
  version = "1.0.22"
@@ -786,10 +794,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
786
794
  checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
787
795
 
788
796
  [[package]]
789
- name = "unindent"
790
- version = "0.2.4"
797
+ name = "unicode-segmentation"
798
+ version = "1.12.0"
791
799
  source = "registry+https://github.com/rust-lang/crates.io-index"
792
- checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
800
+ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
793
801
 
794
802
  [[package]]
795
803
  name = "uuid"
@@ -858,6 +866,79 @@ dependencies = [
858
866
  "unicode-ident",
859
867
  ]
860
868
 
869
+ [[package]]
870
+ name = "windows-sys"
871
+ version = "0.59.0"
872
+ source = "registry+https://github.com/rust-lang/crates.io-index"
873
+ checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
874
+ dependencies = [
875
+ "windows-targets",
876
+ ]
877
+
878
+ [[package]]
879
+ name = "windows-targets"
880
+ version = "0.52.6"
881
+ source = "registry+https://github.com/rust-lang/crates.io-index"
882
+ checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
883
+ dependencies = [
884
+ "windows_aarch64_gnullvm",
885
+ "windows_aarch64_msvc",
886
+ "windows_i686_gnu",
887
+ "windows_i686_gnullvm",
888
+ "windows_i686_msvc",
889
+ "windows_x86_64_gnu",
890
+ "windows_x86_64_gnullvm",
891
+ "windows_x86_64_msvc",
892
+ ]
893
+
894
+ [[package]]
895
+ name = "windows_aarch64_gnullvm"
896
+ version = "0.52.6"
897
+ source = "registry+https://github.com/rust-lang/crates.io-index"
898
+ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
899
+
900
+ [[package]]
901
+ name = "windows_aarch64_msvc"
902
+ version = "0.52.6"
903
+ source = "registry+https://github.com/rust-lang/crates.io-index"
904
+ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
905
+
906
+ [[package]]
907
+ name = "windows_i686_gnu"
908
+ version = "0.52.6"
909
+ source = "registry+https://github.com/rust-lang/crates.io-index"
910
+ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
911
+
912
+ [[package]]
913
+ name = "windows_i686_gnullvm"
914
+ version = "0.52.6"
915
+ source = "registry+https://github.com/rust-lang/crates.io-index"
916
+ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
917
+
918
+ [[package]]
919
+ name = "windows_i686_msvc"
920
+ version = "0.52.6"
921
+ source = "registry+https://github.com/rust-lang/crates.io-index"
922
+ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
923
+
924
+ [[package]]
925
+ name = "windows_x86_64_gnu"
926
+ version = "0.52.6"
927
+ source = "registry+https://github.com/rust-lang/crates.io-index"
928
+ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
929
+
930
+ [[package]]
931
+ name = "windows_x86_64_gnullvm"
932
+ version = "0.52.6"
933
+ source = "registry+https://github.com/rust-lang/crates.io-index"
934
+ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
935
+
936
+ [[package]]
937
+ name = "windows_x86_64_msvc"
938
+ version = "0.52.6"
939
+ source = "registry+https://github.com/rust-lang/crates.io-index"
940
+ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
941
+
861
942
  [[package]]
862
943
  name = "winnow"
863
944
  version = "0.7.14"
@@ -13,9 +13,9 @@ readme = "README.md"
13
13
  crate-type = ["cdylib", "rlib"]
14
14
 
15
15
  [dependencies]
16
- beancount-parser = { git = "https://github.com/trim21/beancount.git", rev = "8b4e3311258194fe3127862dd4132028e97cc01d" }
16
+ beancount-parser = { git = "https://github.com/trim21/beancount.git", rev = "70c986d417ba320486b5eb6efaea9d82821620c4", features = ["rich-errors"] }
17
17
  pyderive = "0.9.2"
18
- pyo3 = { version = "0.27.2", features = ["abi3-py310", "multiple-pymethods", "generate-import-lib"] }
18
+ pyo3 = { version = "0.28.0", features = ["abi3-py310", "multiple-pymethods", "generate-import-lib"] }
19
19
 
20
20
  [features]
21
21
  default = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beancount_ast
3
- Version: 0.0.1a3
3
+ Version: 0.0.1a4
4
4
  Summary: Parse Beancount content into AST
5
5
  Home-Page: https://github.com/trim21/beancount-ast
6
6
  Requires-Python: >=3.10
@@ -12,15 +12,17 @@ from ._ast import (
12
12
  Event,
13
13
  File,
14
14
  Headline,
15
+ Raw,
15
16
  Include,
16
17
  KeyValue,
17
18
  KeyValueValue,
18
- Meta,
19
19
  Note,
20
20
  NumberExpr,
21
21
  Open,
22
22
  Option,
23
23
  Pad,
24
+ ParseError,
25
+ ParseErrorDetail,
24
26
  Plugin,
25
27
  PopMeta,
26
28
  Posting,
@@ -56,15 +58,17 @@ __all__ = [
56
58
  "Event",
57
59
  "File",
58
60
  "Headline",
61
+ "Raw",
59
62
  "Include",
60
63
  "KeyValue",
61
64
  "KeyValueValue",
62
- "Meta",
63
65
  "Note",
64
66
  "NumberExpr",
65
67
  "Open",
66
68
  "Option",
67
69
  "Pad",
70
+ "ParseError",
71
+ "ParseErrorDetail",
68
72
  "Plugin",
69
73
  "PopMeta",
70
74
  "Posting",