gash/tests
Timothy Sample 118750bb79 Handle here-documents everywhere
This commit fixes a problem with the old method of handling
here-documents.  We used to ignore here-documents in many places where
they are valid (e.g., between Boolean operators).  They are now valid
after any 'NEWLINE' token.  To achieve this, the handling logic was
moved out of the parser and into the lexer.  We now use a hook
mechanism to manage the necessary communication between the parser and
lexer.

* geesh/parser.scm (read-here-docs): Return strings instead of tokens.
(make-lexer): Add here-docs-hook as a keyword argument, and call it
after reading here-documents.
(make-parser): Let command-hooks transform commands, and remove
here-document handling rules.
(parse): Handle merging here-documents into commands.
* tests/parser.scm: Add tests for many less-intuitive here-document
locations.
2018-12-05 16:08:09 -05:00
..
spec Enable a test from the redirect spec. tests 2018-12-05 16:08:09 -05:00
automake.scm Initial commit 2018-01-31 14:52:05 -05:00
config.scm.in Add shell module 2018-11-28 23:07:03 -05:00
lexer.scm Fix lexing of empty double quotes 2018-11-09 16:22:11 -05:00
parser.scm Handle here-documents everywhere 2018-12-05 16:08:09 -05:00
pattern.scm Add pattern module 2018-12-05 16:08:09 -05:00
shell.scm Handle command not found with status 127 2018-12-05 16:08:09 -05:00
word.scm Globalize the environment module 2018-12-05 16:08:09 -05:00