diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-10-10 10:27:50 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-10-10 10:27:50 +0100 |
| commit | f5318c46d13ed3f3de20e0f61c4193e6ad46a42b (patch) | |
| tree | 89f62b9ea2e6b07816335c6695e358051e8152f1 /src/parser.cpp | |
| parent | 90babbfbf30cc9c611af74e8c0af3562faf4d58b (diff) | |
Implicit Values: `context`; Fix lvalue selector assignments; Fix offset_of* for `using` fields.
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 32287af03..1cff4b573 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2257,17 +2257,17 @@ AstNode *parse_decl(AstFile *f, AstNodeArray names) { AstNodeArray values = {}; AstNode *type = NULL; - // for_array(i, names) { - // AstNode *name = names[i]; - // if (name->kind == AstNode_Ident) { - // String n = name->Ident.string; - // // NOTE(bill): Check for reserved identifiers - // if (n == "context") { - // syntax_error(ast_node_token(name), "`context` is a reserved identifier"); - // break; - // } - // } - // } + for_array(i, names) { + AstNode *name = names[i]; + if (name->kind == AstNode_Ident) { + String n = name->Ident.string; + // NOTE(bill): Check for reserved identifiers + if (n == "context") { + syntax_error(ast_node_token(name), "`context` is a reserved identifier"); + break; + } + } + } if (allow_token(f, Token_Colon)) { if (!allow_token(f, Token_type)) { |