The AST generated by the parser did not match the syntax document. However, neither were right. This commit updates the syntax document to describe a more consistent form, and fixes the code to follow it. * doc/syntax.txt (word): Make the children of '<sh-cmd-sub>' a possibly empty list of 'list's. * geesh/lexer.scm (get-bracketed-command): Splice in children for '<sh-cmd-sub>'. (get-backquoted-command): Ditto. * geesh/parser.scm (read-sh/bracketed): Make sure that result is always a list. (read-sh/backquoted): Ditto. * tests/lexer.scm: Update tests accordingly. * tests/parser.scm: Ditto. |
||
---|---|---|
.. | ||
syntax.txt |