- Update ast.rs with Phase trait (Parsed/Typed), Ty enum, and generic
AST nodes so the same tree works pre- and post-type-checking
- Add checker/ module implementing the 4-pass semantic analyser from
SEMANTICS.md: struct/function collection, field resolution + size-cycle
detection, full expression/statement type checking, and entry-point
validation
- Wire checker into main; semantic errors are only run when the parse
succeeds and are rendered with the same diagnostic machinery
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>