aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-08-16 15:16:57 +0100
committergingerBill <bill@gingerbill.org>2018-08-16 15:16:57 +0100
commit884d5fed9f2894a91ede38fb073338b1fe94a483 (patch)
tree41867331fdc096743e0072bf55067f77ebc306fb /src/parser.cpp
parentec84188597b6558970e66ec7918851f1267888df (diff)
bit_set['A'..'Z'], bit_set[0..8]
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index b21b817e4..94d87ecee 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1962,7 +1962,12 @@ Ast *parse_operand(AstFile *f, bool lhs) {
case Token_bit_set: {
Token token = expect_token(f, Token_bit_set);
Token open = expect_token(f, Token_OpenBracket);
- Ast * base = parse_type(f);
+
+ bool prev_allow_range = f->allow_range;
+ f->allow_range = true;
+ Ast *base = parse_expr(f, false);
+ f->allow_range = prev_allow_range;
+
Token close = expect_token(f, Token_CloseBracket);
return ast_bit_set_type(f, token, base);