Skip to content

Commit dc4e9a5

Browse files
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

File tree

crates/zyn_peg/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pub mod runtime;
4747
pub mod grammar;
4848
pub mod runtime2;
4949
pub mod codegen;
50+
pub mod typed_ast;
5051

5152
// Parser for .zyn grammar files
5253
#[derive(Parser)]

0 commit comments

Comments
 (0)