aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-15 11:14:34 +0100
committergingerBill <bill@gingerbill.org>2021-08-15 11:14:34 +0100
commit19aefa6a403839da978217b40ffee6be29e96292 (patch)
tree1a3f14fbd30798ae0b1c72f25a77c30a16c331c5 /src/parser.cpp
parenteffecf8595ee69b5ab1f63e14c1577fbe983da04 (diff)
Add assignment statement to `#no_bounds_check` etc rules. Correct `os_linux.odin` usage.
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 7105c455a..bdc34e4a1 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1980,6 +1980,7 @@ Ast *parse_check_directive_for_statement(Ast *s, Token const &tag_token, u16 sta
case Ast_TypeSwitchStmt:
case Ast_ReturnStmt:
case Ast_DeferStmt:
+ case Ast_AssignStmt:
// Okay
break;
@@ -1989,7 +1990,7 @@ Ast *parse_check_directive_for_statement(Ast *s, Token const &tag_token, u16 sta
}
break;
default:
- syntax_error(tag_token, "#%.*s may only be applied to the following statements: '{}', 'if', 'when', 'for', 'switch', 'return', 'defer', variable declaration", LIT(name));
+ syntax_error(tag_token, "#%.*s may only be applied to the following statements: '{}', 'if', 'when', 'for', 'switch', 'return', 'defer', assignment, variable declaration", LIT(name));
break;
}
break;