mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-26 01:13:48 +00:00
Bodged in support for region pragmas
Have them as basic directives They're similar to the assert and panic macros but are hardcoded to true #region (<string literal>) #endregion (<string literal>)
This commit is contained in:
+15
-1
@@ -1670,7 +1670,21 @@ gb_internal bool check_builtin_procedure_directive(CheckerContext *c, Operand *o
|
||||
operand->value = found->Constant.value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
// Bodging in #region & #endregion support
|
||||
else if (name == "region") {
|
||||
operand->type = t_untyped_bool;
|
||||
operand->mode = Addressing_Constant;
|
||||
operand->value = exact_value_bool(true);
|
||||
}
|
||||
else if (name == "endregion") {
|
||||
operand->type = t_untyped_bool;
|
||||
operand->mode = Addressing_Constant;
|
||||
operand->value = exact_value_bool(true);
|
||||
}
|
||||
|
||||
else {
|
||||
error(call, "Unknown directive call: #%.*s", LIT(name));
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user