aboutsummaryrefslogtreecommitdiff
path: root/src/compile/loops.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2026-01-11 20:06:45 -0500
committerBruce Hill <bruce@bruce-hill.com>2026-01-11 20:06:45 -0500
commitb97ea6b6ac3498b21321e1f93ccc1a2dd145e9d7 (patch)
tree834180f2c5a2ad29424279153d01c2bd52679823 /src/compile/loops.c
parent573656fce2b7e1b0fc36944f60fd135117b6bbb6 (diff)
Rename AST nodes: Int -> Integer, Num -> Number
Diffstat (limited to 'src/compile/loops.c')
-rw-r--r--src/compile/loops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compile/loops.c b/src/compile/loops.c
index 96299c5e..f3ae9b59 100644
--- a/src/compile/loops.c
+++ b/src/compile/loops.c
@@ -125,7 +125,7 @@ Text_t compile_for_loop(env_t *env, ast_t *ast) {
// Special case for Int.onward()
arg_ast_t *args = Match(for_->iter, MethodCall)->args;
arg_t *arg_spec =
- new (arg_t, .name = "step", .type = INT_TYPE, .default_val = FakeAST(Int, .str = "1"), .next = NULL);
+ new (arg_t, .name = "step", .type = INT_TYPE, .default_val = FakeAST(Integer, .str = "1"), .next = NULL);
Text_t step = compile_arguments(env, for_->iter, arg_spec, args);
Text_t value = for_->vars ? compile(body_scope, for_->vars->ast) : Text("i");
return Texts("for (Int_t ", value, " = ", compile(env, Match(for_->iter, MethodCall)->self), ", ",
@@ -231,8 +231,8 @@ Text_t compile_for_loop(env_t *env, ast_t *ast) {
}
case BigIntType: {
Text_t n;
- if (for_->iter->tag == Int) {
- const char *str = Match(for_->iter, Int)->str;
+ if (for_->iter->tag == Integer) {
+ const char *str = Match(for_->iter, Integer)->str;
Int_t int_val = Int$from_str(str);
if (int_val.small == 0) code_err(for_->iter, "Failed to parse this integer");
mpz_t i;