feat: execute Bro-compatible integer range loops

This commit is contained in:
2026-10-10 01:47:30 +02:00
parent d51ca57c9e
commit cf39481bfc
16 changed files with 1416 additions and 16 deletions
+10
View File
@@ -32,6 +32,11 @@ Code :: enum {
invalid_assignment_target,
break_outside_loop,
continue_outside_loop,
invalid_range_bound,
invalid_for_iterable,
range_value_not_supported,
range_pointer_capture,
range_index_capture,
missing_entry,
invalid_entry,
literal_out_of_range,
@@ -102,6 +107,11 @@ messages :: $enummap.init(Code, []u8, {
invalid_assignment_target = "assignment requires a mutable local binding",
break_outside_loop = "break requires an enclosing loop",
continue_outside_loop = "continue requires an enclosing loop",
invalid_range_bound = "range bounds must have compatible integer types",
invalid_for_iterable = "for-loop iteration currently requires a direct integer range",
range_value_not_supported = "first-class range values are not implemented",
range_pointer_capture = "range loops do not support pointer captures",
range_index_capture = "range loops do not support index captures",
missing_entry = "program requires a main function",
invalid_entry = "main must be a function with no parameters",
literal_out_of_range = "numeric literal is outside its runtime type's range",