From f5318c46d13ed3f3de20e0f61c4193e6ad46a42b Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Mon, 10 Oct 2016 10:27:50 +0100 Subject: Implicit Values: `context`; Fix lvalue selector assignments; Fix offset_of* for `using` fields. --- src/parser.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/parser.cpp') 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)) { -- cgit v1.2.3