summaryrefslogtreecommitdiffstats
path: root/dimension/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/parse.c')
-rw-r--r--dimension/parse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index 99cda05..74075a7 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -76,7 +76,13 @@ void dmnsn_local_symbol(dmnsn_symbol_table *symtable,
dmnsn_dictionary *dict;
dmnsn_array_get(symtable, dmnsn_array_size(symtable) - 1, &dict);
- dmnsn_dictionary_insert(dict, id, &value);
+ dmnsn_astnode *node = dmnsn_dictionary_at(dict, id);
+ if (node) {
+ dmnsn_delete_astnode(*node);
+ *node = value;
+ } else {
+ dmnsn_dictionary_insert(dict, id, &value);
+ }
}
void