Make AstNodeIdent a struct wrapping its Token

This commit is contained in:
Ginger Bill
2017-06-29 12:11:50 +01:00
parent f4879d4723
commit d167290b28
8 changed files with 60 additions and 58 deletions

View File

@@ -291,7 +291,7 @@ void init_entity_foreign_library(Checker *c, Entity *e) {
} else if (ident->kind != AstNode_Ident) {
error(ident, "foreign library names must be an identifier");
} else {
String name = ident->Ident.string;
String name = ident->Ident.token.string;
Entity *found = scope_lookup_entity(c->context.scope, name);
if (found == NULL) {
if (name == "_") {