From b97ea6b6ac3498b21321e1f93ccc1a2dd145e9d7 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Jan 2026 20:06:45 -0500 Subject: Rename AST nodes: Int -> Integer, Num -> Number --- src/parse/functions.c | 4 ++-- src/parse/numbers.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/parse') diff --git a/src/parse/functions.c b/src/parse/functions.c index 8fb9f78e..e4eb1317 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, Int, .str = "-1"); + if (!cache_ast) cache_ast = NewAST(ctx->file, pos, pos, Integer, .str = "-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, Int, .str = "-1"); + if (!cache_ast) cache_ast = NewAST(ctx->file, pos, pos, Integer, .str = "-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'"); diff --git a/src/parse/numbers.c b/src/parse/numbers.c index 4e746525..1ab774b4 100644 --- a/src/parse/numbers.c +++ b/src/parse/numbers.c @@ -40,13 +40,13 @@ ast_t *parse_int(parse_ctx_t *ctx, const char *pos) { if (match(&pos, "%")) { double n = strtod(str, NULL) / 100.; - return NewAST(ctx->file, start, pos, Num, .n = n); + return NewAST(ctx->file, start, pos, Number, .n = n); } else if (match(&pos, "deg")) { double n = strtod(str, NULL) * RADIANS_PER_DEGREE; - return NewAST(ctx->file, start, pos, Num, .n = n); + return NewAST(ctx->file, start, pos, Number, .n = n); } - return NewAST(ctx->file, start, pos, Int, .str = str); + return NewAST(ctx->file, start, pos, Integer, .str = str); } ast_t *parse_num(parse_ctx_t *ctx, const char *pos) { @@ -77,5 +77,5 @@ ast_t *parse_num(parse_ctx_t *ctx, const char *pos) { if (match(&pos, "%")) d /= 100.; else if (match(&pos, "deg")) d *= RADIANS_PER_DEGREE; - return NewAST(ctx->file, start, pos, Num, .n = d); + return NewAST(ctx->file, start, pos, Number, .n = d); } -- cgit v1.2.3