summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-12-10 15:15:47 -0800
committerPreston Pan <preston@nullring.xyz>2023-12-10 15:15:47 -0800
commite48017a6c2c9b7c3d989d660a1561f1ebb415878 (patch)
treea71f37f5d93b159307f307323b58735cbf7b3096 /src/parser.c
parentb253a58db000dad649654e8fb4a0cb2036c95118 (diff)
Add more nxs functionsmaster
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c3
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 */