docs+runner+parser: SSOT+AST using finalized (legacy text inlining removed); provider verify reads nyash.toml; preflight warn hook; method-body guard removed; CURRENT_TASK updated for next JSON work

This commit is contained in:
Selfhosting Dev
2025-09-26 00:27:02 +09:00
parent d9f26d4549
commit 85084664c2
77 changed files with 1259 additions and 1026 deletions

View File

@ -0,0 +1,14 @@
# Examples: Plugin BoxRef Return (v2.2)
- File: `plugin_boxref_return.nyash`
- Purpose: Demonstrates a plugin method returning a Box (BoxRef/Handle), and passing Box as an argument.
How to run (after full build):
- Ensure `nyash.toml` includes FileBox with methods:
- `copyFrom = { method_id = 7, args = [ { kind = "box", category = "plugin" } ] }`
- `cloneSelf = { method_id = 8 }`
- Build the plugin: `cd plugins/nyash-filebox-plugin && cargo build --release`
- Run the example: `./target/release/nyash docs/examples/plugin_boxref_return.nyash`
Expected behavior:
- Creates two FileBox instances (`f`, `g`), writes to `f`, copies content to `g` via `copyFrom`, then closes both.