Commit Graph
3 Commits
Author SHA1 Message Date
Gavin Schulz a0385b2b4c refactor: replace canonicalSymbol and methodArgumentsString with unified methodNotFound helper in wren_vm.c 2015-01-09 05:30:47 +00:00
Gavin Schulz 9fe43fec45 feat: include method arity in missing method runtime error messages
Add helper functions `canonicalSymbol` and `methodArgumentsString` to extract and format the argument count from symbol names. Update the runtime error message in `runInterpreter` to append the arity (e.g., "with 0 arguments", "with 2 arguments", "with 1 argument") when a class does not implement a method. Add new test cases for missing methods with one, two, and eleven arguments, and update all existing test expectations to include the arity suffix.
2015-01-04 19:42:11 +00:00
Gavin Schulz 7048facaa4 fix: skip wrenInterpret call when REPL input is empty line
Add a strcmp check against "\n" before invoking wrenInterpret in the
runRepl function, preventing an unnecessary interpretation attempt and
potential error handling for blank user input.
2015-01-03 19:25:10 +00:00