How toteload/gamma works
Component Relationships
a. Data Flow Direction:
Source Code → Tokens → AST → Annotated AST → LLVM IR
• String Interner (src/string_interner.rs)
• Type Interner (src/type_interner.rs)
• Scope Stack (src/scope_stack.rs)
• Error Handling (src/error.rs)
Detailed Component Breakdown
• Break/Continue Validation
• Main Function Validation
• Symbol Usage Validation
• Type Annotation
• Type Node Annotation
• Type Checking
• Type Coercion
Visitor Pattern Implementation
• Visitor
• VisitorMut
• VisitorWithContext
• VisitorMutWithContext
Testing Infrastructure
A separate section showing:
• Snapshot Testing System
• Sample Programs
• Test Generation
Key Considerations:
A small note about the project's scope
• Single-file compilation
• No module system
• Goal-oriented feature set (Tetris with SDL2)