Skip to content

Commit ec3185e

Browse files
committed
feat: add CST-to-AST converter
Single-pass recursive walk that transforms tree-sitter CST into Go-native AST nodes. This is the only code that touches tree-sitter after parsing. Key transformations: - Delegate chain collapsing (expr->ternary->...->int => LitInt) - Leaf value pre-parsing (ints, floats, bools at conversion) - String escape resolution using delimiter context - Compound assign desugaring (x += 3 => Assign + OpBinary) - Incr/decr desugaring (x++ => Assign + OpBinary) - Operator resolution to enum (no string comparison at eval) - Eager function body conversion (not lazy at call time) - VarPath flat segment construction from indexed_expr - Interpolation format specifier extraction
1 parent c518d3e commit ec3185e

File tree

1 file changed

+1059
-0
lines changed

1 file changed

+1059
-0
lines changed

0 commit comments

Comments
 (0)