Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interleave parsing and execution in the main loop.
This is needed for: - alias: runtime information is fed back into the parsing process - when a shell scripts "changes languages" below 'exit' Introduced a new file main_loop.py, which has Interactive() and Batch() functions. These call CommandParser.ParseOne() and Executor.ExecuteAndCatch(), which are new interfaces. Also move AST printing with -n into core/ui.py. The main file is greatly simplified. NOTE: apparently this fixed a parse error! In test/spec.sh parse-errors. Also: - More notes about wild parse errors - More tests for alias: inside subshell, eval, etc. All unit tests and spec tests pass. test/parse-errors.sh passes. Still TODO: - Get rid of ParseWholeFile - There is a test failure in test/gold.sh (that doesn't make any other test fail?)
- Loading branch information
Andy Chu
committed
Sep 3, 2018
1 parent
f7e096d
commit b6d6791
Showing
13 changed files
with
336 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.