yasl-lang / yasl

Bytecode Interpreter for Yet Another Scripting Language (YASL).
MIT License
65 stars 14 forks source link

fix `continue` in loops #447

Closed CoffeeTableEspresso closed 2 years ago

CoffeeTableEspresso commented 2 years ago

continue currently does not correctly handle local variables in for loops.

For example:

for let i = 0; i < 10_000; i += 1 {
    const k = 'foo';
    continue;
}

should be a no-op, but will cause a stack-overflow.

CoffeeTableEspresso commented 2 years ago

Added in v0.11.12