Introduce num_toString primitive that converts numeric values to string representation via sprintf with "%g" format, and add AS_NUM and AS_STRING accessor macros to vm.h for cleaner type extraction. Refactor existing numeric and string primitives to use these macros instead of direct struct member access. Include test files for number_toString and string_toString with basic equality checks (skipped due to unimplemented == operator).
Add parser support for +, -, *, / operators with correct precedence (term/factor) and emit method calls. Implement primitive methods for num_plus, num_minus, num_multiply, num_divide, and string_plus. Update VM to pass VM pointer to primitives and add unsupported value for type errors. Include test files for each operator.
Implement the io.write() primitive function that prints a value followed by a newline, enabling basic output for testing. Add a Python test runner script (runtests) that discovers and executes .wren test files, comparing output against // expect: comments. Include initial number literal tests covering positive, negative, and zero values. Remove debug print statements from the VM interpreter and refactor primitive registration macros for cleaner code.
Move the PRIMITIVE macro and all primitive function implementations (num_abs, string_contains, string_count) from vm.c into new src/primitives.c and src/primitives.h files. Add registerPrimitives() function to centralize primitive registration, removing inline PRIMITIVE calls from newVM(). Also remove unused numGlobals field from VM struct and add primitives.c to Xcode project sources.