From 1dd70768893af2a05548431954f1952810e34741 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 30 Jun 2025 09:25:35 -0400 Subject: [PATCH] remove region/endregion directives, using editor extensions for comment signatures instead. --- src/check_builtin.cpp | 13 ------------- src/check_expr.cpp | 2 -- src/parser.cpp | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index 26e013c74..7f9457509 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -2096,19 +2096,6 @@ gb_internal bool check_builtin_procedure_directive(CheckerContext *c, Operand *o array_add(&c->info->defineables, defineable); } - - // 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)); } diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 561182f61..20918c8f9 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -7872,8 +7872,6 @@ gb_internal ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *c name == "exists" || name == "assert" || name == "panic" || - name == "region" || - name == "endregion" || name == "defined" || name == "config" || name == "load" || diff --git a/src/parser.cpp b/src/parser.cpp index 758c4948f..e3e8c6e56 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -5364,7 +5364,7 @@ gb_internal Ast *parse_stmt(AstFile *f) { break; } return s; - } else if (tag == "assert" || tag == "panic" || tag == "region" || tag == "endregion") { + } else if (tag == "assert" || tag == "panic") { Ast *t = ast_basic_directive(f, hash_token, name); Ast *stmt = ast_expr_stmt(f, parse_call_expr(f, t)); expect_semicolon(f);