Commit dc4e9a5
committed
feat: implement ZynPEG 2.0 Phase 3 - TypedAST builder helpers
Add typed_ast module with helper functions for TypedAST construction:
- AstContext for managing builder and type registry
- Expression builders: int_literal, binary, call, method_call, etc.
- Statement builders: let_stmt, if_stmt, while_stmt, for_stmt, etc.
- Declaration builders: function_decl, variable_decl, class_decl
- Operator helpers: parse_binary_op, parse_unary_op
- Fold helpers: fold_binary_left, fold_binary_right
- ParsedValue conversion helpers for runtime integration
All field names and types match the actual zyntax_typed_ast structures.1 parent 398b6ce commit dc4e9a5
3 files changed
Lines changed: 543 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
0 commit comments