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:
23
issues/02-backtick-lexing-parsing.md
Normal file
23
issues/02-backtick-lexing-parsing.md
Normal 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
|
||||
Reference in New Issue
Block a user