mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +02:00
Fix small issues in docs
This commit is contained in:
+11
-11
@@ -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 <n>` | Jump to line `n` and switch to edit mode |
|
||||
| `save [path]` | Save to current path or a new path |
|
||||
| `load <path>` | 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 <n>` | Jump to line `n` and switch to edit mode |
|
||||
| `save [path]` | Save to current path or a new path |
|
||||
| `load <path>` | 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
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ goto <name>
|
||||
```
|
||||
|
||||
`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 <milliseconds>
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user