diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-03-08 23:00:40 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-03-08 23:00:40 -0500 |
commit | 533a684f0ec4d9afa3940ba5c4f516711015ed00 (patch) | |
tree | 2f44d702150ef9b1421231ebded809b156492c5d | |
parent | 684b66050dfcbc6778656627ff19904877ae490d (diff) | |
download | dimension-533a684f0ec4d9afa3940ba5c4f516711015ed00.tar.xz |
Fix locations for expanded identifiers in dmnsn_eval().
-rw-r--r-- | dimension/parse.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dimension/parse.c b/dimension/parse.c index ac74568..a4a4c43 100644 --- a/dimension/parse.c +++ b/dimension/parse.c @@ -809,7 +809,11 @@ dmnsn_eval(dmnsn_astnode astnode, dmnsn_symbol_table *symtable) { dmnsn_astnode *symbol = dmnsn_find_symbol(symtable, astnode.ptr); if (symbol) { - return dmnsn_eval(*symbol, symtable); + dmnsn_astnode id = *symbol; + id.filename = astnode.filename; + id.line = astnode.line; + id.col = astnode.col; + return dmnsn_eval(id, symtable); } else { dmnsn_diagnostic(astnode.filename, astnode.line, astnode.col, "Unbound identifier '%s'", (const char *)astnode.ptr); |