REPL
resonon with no file opens the REPL, in the project of the working directory. Its flags are in the
CLI reference.
The prompt is > . Each line is evaluated when you press Enter, on its own: a statement cannot
continue on the next line.
A line that does not end in ; or } gets a ; added, so PLAY runs PLAY;. Only the text before
the first // is looked at for this.
Output of print() from a cycle callback, and errors raised there, are printed between prompts.
Commands
Section titled “Commands”These words are read by the REPL itself, alone on a line, in capitals:
| Command | What it does |
|---|---|
EXIT | Leaves the REPL. |
RESET | Discards the session and prints Session reset. — as the RESET; statement. |
RELOAD name | Loads the native extension name again — as reload_ext("name"). Without a name: Usage: RELOAD <extension_name>. |
The transport statements work as they do in a file run and from VSCode.
| Key | What it does |
|---|---|
Enter | Evaluates the line |
Ctrl+C | Discards the line and shows a new prompt |
Ctrl+D | Leaves the REPL |
↑ / ↓ | The previous and next lines of this session |
Ctrl+R | Searches the lines of this session |
← / →, Ctrl+A / Ctrl+E | Moves in the line, to its start or end |
The history is kept only while the REPL runs; nothing is written to disk.