Files
lush/issues/02-backtick-lexing-parsing.md
Cormac Shannon 4b49907ce7 Update project issues: resolve #02-#04, add #08-#10
Mark issues #02 (backtick lexing/parsing), #03 (command execution
runtime), and #04 (argv parsing) as resolved. Add new issues for
configuration (#08), programmable prompt (#09), and interactive
command execution (#10).
2026-02-28 18:27:55 +00:00

852 B

02 — Complete backtick command lexing and parsing

Status: resolved 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