Add project issues for lush (Lua + shell) features

Defines syntax decisions and implementation plan across 7 issues:
- backtick command execution returning {code, stdout, stderr}
- ${expr} interpolation in backticks
- $SIGIL env var read/write
- argv parsing, piping, and redirection (future)
This commit is contained in:
Cormac Shannon
2026-02-18 19:08:51 +00:00
parent 4cf498210e
commit db6f39a2a4
7 changed files with 249 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# 02 — Complete backtick command lexing and parsing
**Status:** open
**Blocked by:** #01
**Blocks:** #03
Backtick lexing is partially implemented:
- `llex.c`: TK_COMMAND token lexed via `read_string()` on backtick
- `llex.h`: TK_COMMAND enum added
- `lparser.c`: TK_COMMAND handled in `simpleexp()` (as string) and `suffixedexp()` (as func args)
## Remaining work
- Verify the lexer handles edge cases (escaped backticks, newlines, nested quotes)
- Parser must emit code that produces a result table (`{code, stdout, stderr}`) at runtime, not just a string literal
- May need a new opcode (e.g. `OP_COMMAND`) or compile as a call to a built-in execution function
- Add string interpolation inside backticks if decided in #01
## Files touched
- `llex.c` / `llex.h`
- `lparser.c`
- Possibly `lopcodes.h` / `lopcodes.c` if adding a new opcode