Commit 66e004e
committed
feat: migrate ml.zyn grammar to modern TypedAST action format for Grammar2
- Update program, import, module rules to use named bindings and direct TypedAST actions
- Migrate function definitions (all 10 variants) to TypedDeclaration::Function
- Update statements (let, if, while, for, return, break, continue, try/catch, match) to TypedStatement variants
- Convert expressions to use passthrough actions (simplified for initial migration)
- Update literals (int, float, string, bool) to TypedExpression variants
- Add Module and Impl declaration support to GrammarInterpreter
Note: This breaks LanguageGrammar compatibility (pest-based parser doesn't support named bindings).
Grammar2.parse() now works for simple functions. Remaining rules (structs, traits, enums, impls)
still use legacy JSON format and need migration.1 parent e4f1283 commit 66e004e
2 files changed
Lines changed: 271 additions & 482 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
645 | 669 | | |
646 | 670 | | |
647 | 671 | | |
| |||
0 commit comments