diff options
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.c b/src/parser.c index 5f97ef9..12b1256 100644 --- a/src/parser.c +++ b/src/parser.c @@ -140,6 +140,9 @@ void parse_bind(parser_t *parser) { parser_error(parser); token_t *t = parser->tokens[parser->i]; char *name = t->value; + if (hash_table_get(parser->symbol_table, name) != NULL) { + parser_error(parser); + } parser_move(parser); ast_t *expr = parse_expr(parser); /* unevaluated expr will be evaluated when hash table transfers to visitor JIT */ |