You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Stack traces. Errors raised inside a user function now carry the
call chain, innermost frame first:
Error: <msg>
at inner
at middle
at outer
Both engines produce identical traces. Tree-walk: each
invoke_user_function appends its own frame on the error path. VM:
run_function gained a wrapper that pushes a call frame on entry,
pops on exit, and appends to the message on Err. Source line
numbers are TODO (would require AST span threading).
Bonus: VM run_function previously leaked a scope frame on `?`-style
errors (vm_pop_scope was only reached on the success path). The
new wrapper rescues the scope on the error path too.
* REPL upgrades. The interactive shell now:
- Evaluates and prints bare expressions: `1 + 2` shows `3`. Parser
error "Expected Semicolon" + balanced braces + no trailing `;`
triggers re-parse with `;` appended.
- Continues multi-line input until braces/parens are balanced. The
is_balanced helper ignores chars inside string literals.
- REPL meta-commands: :help, :quit, :reset.
- Prompt switches to "...> " during continuation.
* Parser: `arr[idx]` / `dict[key]` work in expression position. The
Statement::Assignment dispatch previously committed to Statement::
IndexAssignment as soon as it saw `Ident[`, then unconditionally
expected `=`. Now it lookaheads after `]` and falls back to
expression-statement parsing if the `=` isn't there. Without this,
bare `d["key"]` at the REPL hit "Expected Eq, got Eof".
41/41 functional examples produce identical output under tree-walk
and VM. 92/92 unit tests pass.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments