summaryrefslogtreecommitdiffstats
path: root/src/poem/read.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix another regression with aliasesRory Dudley2024-05-131-17/+11
| | | | | | | | The last commit (1415c8f9b89699000ef8d864ff8f0e1bebca4a5f) fixed the issue with pipes, however, it did not fix it for IO. This patch adds some logic for the aliased verse to inherit the properties of the original verse, so that recite works properly for all verse types (regardless of IO, couplet, or meter).
* Fix regression with aliasesRory Dudley2024-05-121-14/+65
| | | | | | | | | Fixed a regression that was introduced in: 1415c8f9b89699000ef8d864ff8f0e1bebca4a5f. Moving aliases to read() broke how pipes worked. This commit removes the troublesome append!() macro, and replaces it with some logic in the add() function (impl Appendable for Poem).
* Add 'strings' to the verse after the string!() macroRory Dudley2024-04-061-0/+4
| | | | | | This patches fixes a bug, where sometimes, when a Rune::String was detected, the resulting string from the string!() macro wasn't getting pushed to the current verse.
* Handle aliases in read()Rory Dudley2024-04-041-13/+21
| | | | | | Instead of handling aliases in the recite() function, which requires two loops to handle properly with the current implementation, offload checking for aliases to the read() function.
* Add comments (`#`) to the parserRory Dudley2024-03-281-1/+6
| | | | | The parser will now interpret the '#' character as a single-line comment string, which works on it's own line, or at the end of an existing line.
* Remove defunct code from read() and recite()Rory Dudley2024-03-241-13/+0
| | | | | Remove some commented out code, that is no longer needed after the parser overhaul.
* read() and recite() overhaulRory Dudley2024-03-231-0/+261
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.