Repository navigation
v0.15.1 - Error Propagation Milestone
Error Propagation Milestone
This release marks a significant milestone: the @error(code) metafunction is now fully working!
Key Features
@error(code)metafunction - Sets CY flag and returns with error code- Proper Z80 code generation - Generates
SCF(Set Carry Flag) instruction - CY flag + A register ABI - Complete error handling ABI
Example
enum FileError { None, NotFound, Permission }
fun read_file?(path: u8) -> u8 ? FileError {
if path == 0 {
@error(1); // FileError.NotFound - sets CY flag
}
return path;
}
Generated Z80 Assembly
LD A, D ; Load error code
SCF ; Set carry flag (error indicator)
RET ; Return with errorMetrics
- Compilation rate: 81% (48/59 examples)
- No regressions from previous release
Documentation
What's Next
- Enum value access (
ErrorType.Valuesyntax) ?? @errorpropagation syntax cleanup- Type inference for
?-suffixed function calls
Full Changelog: v0.9.7...v0.15.1