aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-02-14 12:35:50 +0000
committerGinger Bill <bill@gingerbill.org>2017-02-14 12:35:50 +0000
commit74d15ab84b39a83285953b963f1637956f091f45 (patch)
tree4dcee1f973197146353ec4edede418a51db432af /src/parser.c
parent763cd2649da4c87d8a9be2c2e44f8535e757a95a (diff)
Reimplement `immutable` with different rules.
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser.c b/src/parser.c
index b5d8f442b..69ea32c48 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -2358,7 +2358,7 @@ bool is_token_field_prefix(TokenKind kind) {
switch (kind) {
case Token_using:
case Token_no_alias:
- // case Token_immutable:
+ case Token_immutable:
return true;
}
return false;
@@ -2374,7 +2374,7 @@ u32 parse_field_prefixes(AstFile *f) {
switch (f->curr_token.kind) {
case Token_using: using_count += 1; next_token(f); break;
case Token_no_alias: no_alias_count += 1; next_token(f); break;
- // case Token_immutable: immutable_count += 1; next_token(f); break;
+ case Token_immutable: immutable_count += 1; next_token(f); break;
}
}
if (using_count > 1) syntax_error(f->curr_token, "Multiple `using` in this field list");
@@ -3272,7 +3272,7 @@ AstNode *parse_stmt(AstFile *f) {
return ast_bad_stmt(f, token, f->curr_token);
} break;
-#if 0
+#if 1
case Token_immutable: {
Token token = expect_token(f, Token_immutable);
AstNode *node = parse_stmt(f);