Skip to content

Commit 39ee40d

Browse files
committed
feat: implement TypedAST construction in GrammarInterpreter
Add runtime TypedAST construction to GrammarInterpreter, enabling direct parsing and AST generation without code generation. This allows embedded DSL use cases and rapid prototyping with the ZynPEG 2.0 grammar system. Changes: - Add action executor to GrammarInterpreter that evaluates ActionIR and constructs TypedAST nodes (TypedStatement, TypedExpression, etc.) - Add Float variant to ParsedValue for floating-point literals - Add TypedAST variants to ParsedValue (Statement, Expression, Declaration, Program, Block) for returning constructed AST nodes - Implement helper function execution (intern, parse_int, parse_float, text) - Handle Box::new() as transparent wrapper in action evaluation - Fix repeat binding accumulation - inner bindings now collect into lists - Fix text() helper to use __text__ binding from atomic rules - Add comprehensive tests demonstrating TypedAST construction from vintage.imgpipe parsing
1 parent 781b4fd commit 39ee40d

3 files changed

Lines changed: 1176 additions & 15 deletions

File tree

0 commit comments

Comments
 (0)