Add `line.replace("\\", "\\\\")` to the `wren_to_c_string.py` script so that backslashes in Wren source code (e.g., `\n`, `\r`, `\x1b`) are properly escaped when embedded as C string literals. This fixes incorrect escape sequences in `io.wren.inc` and `repl.wren.inc` that caused runtime failures when reading line separators and rendering REPL output.
Refactor File.openWithFlags, File.close, Stat.path, and Timer.sleep to use the new
Scheduler.await_ block syntax instead of manually calling runNextScheduled_ after
each foreign operation. This simplifies the async pattern and ensures proper fiber
suspension. Also fix File.close to check isOpen flag before attempting close.
Add foreign static methods `create_` and `delete_` to the Directory class in the Wren io module, backed by C implementations using `uv_fs_mkdir` and `uv_fs_rmdir` with proper error handling via `schedulerResumeError`. Refactor existing `Directory.list` and `File.delete` to use the new `Scheduler.await_` helper instead of manually calling `runNextScheduled_`, and rename `ensurePath_` to `ensureString_` for consistency across both classes. Introduce a new test file `create_delete.wren` that validates directory creation, existence checks, and deletion on both POSIX and Windows platforms.
Replace the generic "Do not edit" comment in all five `.wren.inc` files with a
more informative preamble that explicitly names the source `.wren` file and the
`util/wren_to_c_string.py` generator script, and update the script's own
`PREAMBLE` template accordingly.
- Prepend a space to C_FORMAT_LINE and WREN_FORMAT_LINE for consistent column alignment
- Add hr() helper function to print horizontal separators for readability
- Change C metrics label from empty string to "C" and WREN label from empty to "WREN"
- Update source directories from "src/vm" and "src/optional" to "deps/wren/src/vm" and "deps/wren/src/optional" to match actual project structure
Extend cross-platform tests to verify Platform.name returns one of seven known
OS strings and assert Process.version splits into exactly three numeric
components, while fixing missing trailing newline in isPosix test file.
Add ALLOCATE macro alongside existing FINALIZE macro to provide symmetric
handling of foreign method allocation and finalization in the module
registry. Update File class bindings to use the new ALLOCATE macro for
fileAllocate and FINALIZE for fileFinalize, replacing the previous
FINALIZER macro usage.