aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-01-21 16:45:29 +0000
committergingerBill <bill@gingerbill.org>2018-01-21 16:45:29 +0000
commit1353d6189455697e87237f74f6e68a781c563182 (patch)
treef8f133f44dc7b9ad7974d0ebd4a930689ff217ff /src/parser.cpp
parent88ba6d8015966d1a16806b31382d2663add74efc (diff)
Minor parsing change
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index de246243a..fdb6a2498 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1943,10 +1943,8 @@ AstNode *parse_operand(AstFile *f, bool lhs) {
}
while (allow_token(f, Token_Hash)) {
Token tag = f->curr_token;
- if (f->curr_token.kind != Token_Ident && f->curr_token.kind != Token_export) {
+ if (!allow_token(f, Token_Ident) && !allow_token(f, Token_export)) {
expect_token_after(f, Token_Ident, "#");
- } else {
- tag = advance_token(f);
}
if (tag.string == "export") {
if (is_export) {