Huff2 is the successor of the huff-rs compiler. At a high-level its goals are:
- to be a maintanable and clean implementation of the language
- generalize and simplify language features
- make it more feasible / scalable to write extremely low-level, optimized code
- EOF?
- (🚧 Current WIP) mostly backwards compatible compiler, with good error handling and error messages
- Grammar + Lexer + Parser
- Parser error recovery
- Basic invalid tokens
- Unclosed brackets
- Invalid nested definitions
- Semantic Analysis
- Global map of top-level definitions
- Macro & macro arg reference validation
- Pretty errors
- Track tree of macro invocations & label definitions
- Resolve label references & error on ambiguous label references
- Resolve set of "objects" to include in compilation (code tables, jump tables, macros)
- Resolve table labels based on scope in which they're referenced
- CLI & Compilation
- Runtime/Initcode flags (
-rvs.-b) - Default constructor generation when
-band no explicit constructor set - Ability to output sizes for contracts
- ABI Builtins
- Runtime/Initcode flags (
- Add small QoL features:
- Pushed tables (jump tables that are inlined as
PUSH<X>instructions) - Make redundant syntax like
#defineoptional - Decimal & binary literals
- Make macros hygenic by making labels scoped
- Introduce "function" labels for explicit out-of-scope jumping
- Pushed tables (jump tables that are inlined as
- Add EOF v1 support
- ??? Expand the language even further (potential ideas)
- BALLS integration for automated stack scheduling
- Comp-time expressions
- basic operators (
+ - / * ^ | & !) on literals and comp-time builtin outputs - bytes/string literals
- basic operators (