interactive luash

This commit is contained in:
2025-08-29 00:28:25 +01:00
parent b750a9b71e
commit 3f0bbb6fa3
5 changed files with 505 additions and 4 deletions

View File

@@ -255,14 +255,25 @@ wc("-l", "file.txt") -- Count lines
./luash script.luash
```
### Interactive Shell (REPL)
```bash
./luash -i
# or
./luash_shell.lua
```
The interactive shell supports:
- All luash preprocessing features
- Multiline input for functions, loops, etc.
- Command history with `.history`
- Special commands: `.help`, `.exit`, `.clear`
- Real-time expression evaluation
### Debug Mode
```bash
LUASH_DEBUG=1 ./luash script.luash
```
### Example Script
See `example.luash` for a comprehensive demonstration of all features.
## Installation
1. Clone or download the luash repository