diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-26 13:59:15 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-26 13:59:15 +0100 |
| commit | a0d8dcd9743c1f1a4dabfc5bba7301785ded98a3 (patch) | |
| tree | fd0bc8416b8a2b71456f0b4a6bf63a4e82373b13 /src/checker.cpp | |
| parent | c642e326cecd3dc33ca5a9efb6330e757c378dd9 (diff) | |
Remove `let`
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 5576180a4..8d0ae001c 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1635,8 +1635,7 @@ void check_collect_entities(Checker *c, Array<AstNode *> nodes, bool is_file_sco check_arity_match(c, vs); } break; - case Token_var: - case Token_let: { + case Token_var: { if (!c->context.scope->is_file) { // NOTE(bill): local scope -> handle later and in order break; @@ -1671,7 +1670,7 @@ void check_collect_entities(Checker *c, Array<AstNode *> nodes, bool is_file_sco error(name, "A declaration's name must be an identifier, got %.*s", LIT(ast_node_strings[name->kind])); continue; } - Entity *e = make_entity_variable(c->allocator, c->context.scope, name->Ident, NULL, gd->token.kind == Token_let); + Entity *e = make_entity_variable(c->allocator, c->context.scope, name->Ident, NULL, false); e->Variable.is_thread_local = (gd->flags & VarDeclFlag_thread_local) != 0; e->identifier = name; |