-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Andrew Lind edited this page Jun 19, 2026
·
3 revisions
Source layout (src/):
| Module | Responsibility |
|---|---|
main.rs / cli.rs
|
CLI parsing, interactive prompts, the top-level driver |
discover.rs |
Find .hx files; package/path helpers |
lexer.rs |
Haxe tokenizer ('${...}' interpolation, 1...6 ranges, @:meta, etc.) |
ast.rs |
Typed AST for the supported Haxe subset |
parser.rs |
Recursive-descent + precedence-climbing parser |
sema/ |
Symbol table, Haxe→C++ type & namespace mapping (types.rs), @:include resolution (includes.rs), pre-codegen validation (validate.rs), and the whole-program escape / ownership analysis (escape.rs) |
codegen/ |
C++ generation: mod.rs (headers), source.rs (.cpp bodies), holder.rs (base-from-member idiom), ownership.rs (destructor delete emission, driven by sema/escape.rs) |
stdafx.rs |
StdAfx.hx → StdAfx.h, and the generated standard-library prelude |
scan.rs |
Small comment-aware scanning helpers |
diag.rs |
Diagnostics (error: / unsupported-feature reporting) |

Hatchet is licensed under the MIT License — see LICENSE. (c) 2026 Andrew Grant Lind
Getting Started
Language Support
- Declarations
- Value Types & Abstracts
- Members & Access
- Statements & Expressions
- Types & Nullability
- Conditional Compilation
- Memory Ownership
Semantics & Interop
Internals