Bugfix for looping

This commit is contained in:
Bruce Hill 2024-03-14 02:44:37 -04:00
parent fdc3eadba2
commit 8847eaa660
2 changed files with 3 additions and 1 deletions

View File

@ -1146,7 +1146,6 @@ CORD compile(env_t *env, ast_t *ast)
}
}
case IntType: {
env_t *scope = fresh_scope(env);
CORD value = compile(env, for_->value);
CORD n = compile(env, for_->iter);
CORD index = for_->index ? compile(env, for_->index) : CORD_EMPTY;

View File

@ -47,6 +47,9 @@ if yes
>> copy
= [10, 20]
if yes
>> [10*i for i in 5]
= [10, 20, 30, 40, 50]
// if yes
// >> arr := @[10, 20]
// >> copy := arr[]