diff --git a/docs/editor.md b/docs/editor.md index 0253100..5daf983 100644 --- a/docs/editor.md +++ b/docs/editor.md @@ -18,17 +18,17 @@ If you pass a file path, it is loaded on startup. ## Command mode commands -| Command | Description | -| --------------------- | --------------------------------------------------------- | -| `edit` | Switch to edit mode | -| `line ` | Jump to line `n` and switch to edit mode | -| `save [path]` | Save to current path or a new path | -| `load ` | Load a file | -| `new` | Create new file | -| `format` | Auto-format indentation | -| `run [path]` | Run script | -| `debug [path] [step]` | Run in debug mode (`step` enables step-by-step execution) | -| `exit` | Close the editor | +| Command | Description | +| --------------------- | ------------------------------------------------------------------- | +| `edit` | Switch to edit mode | +| `line ` | Jump to line `n` and switch to edit mode | +| `save [path]` | Save to current path or a new path | +| `load ` | Load a file | +| `new` | Create new file | +| `format` | Auto-format indentation | +| `run [path]` | Save then run script (runs unsaved buffer if no path is set) | +| `debug [path] [step]` | Save then run in debug mode (`step` enables step-by-step execution) | +| `exit` | Close the editor | ## Edit mode controls diff --git a/docs/language-reference.md b/docs/language-reference.md index ad845b9..26df1e6 100644 --- a/docs/language-reference.md +++ b/docs/language-reference.md @@ -311,7 +311,7 @@ goto ``` `label` marks a target. `goto` performs an unconditional jump to that label. -Labels are scoped to the current function; you cannot jump to a label outside the calling function. +At the top level, labels are file-scoped — you can jump to any label in the file. Inside a function, labels are restricted to the current function; you cannot jump to a label outside the calling function. ```ynt label loop: @@ -618,7 +618,8 @@ to return to the caller instead of terminating that execution flow with `exit`. sleep ``` -Pauses execution for the given number of milliseconds. Respects cancellation: if the script is +Pauses execution for the given number of milliseconds. The argument must be a whole-number integer. +Respects cancellation: if the script is stopped (e.g. via `abort_all` from another task), `sleep` returns early. ```ynt diff --git a/docs/library-api.md b/docs/library-api.md index cfa4247..f40a52e 100644 --- a/docs/library-api.md +++ b/docs/library-api.md @@ -163,7 +163,7 @@ interpreter.AddStatement(attr, args => Console.WriteLine($"[LOG] {args}")); | `End` | A space must follow the keyword | | `StartEnd` | Spaces required on both sides | -Custom statements run at `Priority.Normal` by default. Lower priority values run first. +Custom statements run at `Priority.Normal` by default. Statements with a higher-ranking enum member (`PreProcessing` → `Highest` → … → `VeryLow`) run first; `VeryLow` runs last. Use `StatementAttribute.Priority` to control ordering relative to built-in statements. ---