Commit 5f9979d
committed
fix: Fix struct/enum parsing by adding keyword exclusion and program rule fix
- Add keyword rule to prevent reserved words (struct, enum, fn, etc.)
from being matched as identifiers
- Split program rule into program + declarations for proper child collection
- Fix TypedVariantFields import path
This fixes the issue where struct and enum declarations were being
parsed by pest but not appearing in the final TypedAST output.1 parent 17f7bd5 commit 5f9979d
2 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
541 | 546 | | |
542 | 547 | | |
543 | 548 | | |
544 | | - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
545 | 557 | | |
546 | 558 | | |
547 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
0 commit comments