From 6894dc69374efcc23619e93b040a4224588054cd Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Jan 2026 23:03:00 -0500 Subject: Refactor some AST logic to keep Ints/Reals as "Integer" and "Number" AST nodes and use improved parsing logic from Int/Real --- src/parse/functions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parse/functions.c') diff --git a/src/parse/functions.c b/src/parse/functions.c index e4eb1317..6dfa2509 100644 --- a/src/parse/functions.c +++ b/src/parse/functions.c @@ -119,7 +119,7 @@ ast_t *parse_func_def(parse_ctx_t *ctx, const char *pos) { if (match_word(&pos, "inline")) { is_inline = true; } else if (match_word(&pos, "cached")) { - if (!cache_ast) cache_ast = NewAST(ctx->file, pos, pos, Integer, .str = "-1"); + if (!cache_ast) cache_ast = NewAST(ctx->file, pos, pos, Integer, .i = I(-1)); } else if (match_word(&pos, "cache_size")) { whitespace(ctx, &pos); if (!match(&pos, "=")) parser_err(ctx, flag_start, pos, "I expected a value for 'cache_size'"); @@ -153,7 +153,7 @@ ast_t *parse_convert_def(parse_ctx_t *ctx, const char *pos) { if (match_word(&pos, "inline")) { is_inline = true; } else if (match_word(&pos, "cached")) { - if (!cache_ast) cache_ast = NewAST(ctx->file, pos, pos, Integer, .str = "-1"); + if (!cache_ast) cache_ast = NewAST(ctx->file, pos, pos, Integer, .i = I(-1)); } else if (match_word(&pos, "cache_size")) { whitespace(ctx, &pos); if (!match(&pos, "=")) parser_err(ctx, flag_start, pos, "I expected a value for 'cache_size'"); -- cgit v1.2.3