commit d5d19d4ce85aec0b0b618499c5fa884116b38377
parent 1730c7d71a8865c5cdca4752c255c9d65bc674f7
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 24 Jan 2021 12:23:25 -0500
parse: fix issues with static assertions
Diffstat:
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/parse.c b/src/parse.c
@@ -966,12 +966,9 @@ parse_assertion_expression(struct lexer *lexer, bool is_static)
exp->assert.is_static = is_static;
struct token tok;
- if (is_static) {
- want(lexer, T_ASSERT, &tok);
- }
-
switch (lex(lexer, &tok)) {
case T_STATIC:
+ // XXX: The caller should deal with this for us
exp->assert.is_static = true;
lex(lexer, &tok);
break;
@@ -1830,8 +1827,6 @@ parse_binding_list(struct lexer *lexer, bool is_static)
case T_LET:
// no-op
break;
- case T_STATIC:
- assert(0); // TODO
default:
synassert(false, &tok, T_LET, T_CONST, T_EOF);
}