diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-24 03:36:35 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-24 03:36:35 +0200 |
commit | c4f84a90242b7c507b2636fc99f027345f56d42b (patch) | |
tree | 0e579411d54aa50719d464275e4ea22a48ae07ff | |
parent | e400e3b5a02f6f659339fd9a34f29ab6c01d849f (diff) |
Use fwdnode() when possible
-rw-r--r-- | src/analyzer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyzer.c b/src/analyzer.c index 997e75f..c5a6200 100644 --- a/src/analyzer.c +++ b/src/analyzer.c @@ -260,7 +260,7 @@ analyzeexpr(struct azctx ctx, scope_t *scps, type_t *types, ast_t ast, types[i].kind = TYPE_NUM; types[i].size = 0; types[i].issigned = true; - return i + 1; + return fwdnode(ast, i); case ASTIDENT: { strview_t sv = toks.strs[ast.lexemes[i]]; @@ -288,7 +288,7 @@ analyzeexpr(struct azctx ctx, scope_t *scps, type_t *types, ast_t ast, } types[i] = types[sym->i]; - return i + 1; + return fwdnode(ast, i); } } |