summaryrefslogtreecommitdiffstats
path: root/src/poem/recite.rs
Commit message (Collapse)AuthorAgeFilesLines
* The anthology moduleRory Dudley2024-03-281-57/+63
| | | | | | The anthology module was added to run built-in commands. The 'cd' and 'exit' built-ins were moved from the main recite() loop to this module. Additionally, the 'export' and 'source' built-ins were added.
* Rename prefresh()Rory Dudley2024-03-261-2/+2
| | | | | | Rename the path::prefresh() function to path::refresh(). Calling convention should be to `use crate::path;` or `mod path;`, and then call path::refresh(...), for verbosity.
* Remove defunct code from read() and recite()Rory Dudley2024-03-241-14/+0
| | | | | Remove some commented out code, that is no longer needed after the parser overhaul.
* read() and recite() overhaulRory Dudley2024-03-231-0/+222
Rebuilt the LR parser (i.e. read()) from the ground up. This required that some changes be made to recite(), in order to accomodate the new data structures. These data structures were each split out into their own file, in order to make working with each component a bit easier. In addition to reworking the parts of the parser already present, some new features were also added, such as: - Support for strings (' and ") - Support for environment variables ($) - Support for interpreting tild as $HOME (~) - Support for sub-reading and sub-reciting (`) Notes: This is a huge commit that changes almost the entire program (main.rs is still the same, except for imports). Ideally, huge sweeping changes like this should not occur on the codebase, but since this is still pre-alpha, I guess this is acceptable. This is far from the end of patch set, however, as there is quite a lot of cleanup that needs to be done. For instance, checking for internal poems and environment variables should get split out to their own functions/macros. There is also some defunct code (that's commented out), that is unlikely to be useful in the future.