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)
848 B
848 B
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 viaread_string()on backtickllex.h: TK_COMMAND enum addedlparser.c: TK_COMMAND handled insimpleexp()(as string) andsuffixedexp()(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.hlparser.c- Possibly
lopcodes.h/lopcodes.cif adding a new opcode