Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New list syntax with enforced
,
-operator (#100)
* Char<...> syntax for character classes Step 1 * Use of new Char-syntax in tokay.tok Step 2 * Op::collect() with sequence mode - sequence mode is the previous behavior - void-values with an alias become null values - non-sequence mode always results in a dict (probably empty) * Drafting new dict/list syntax This is unfinished and intermediate, as the syntax is still not clear between inline sequences and dicts. Further development depends on iterators. * Fixing tests for new Char<...> syntax * Substitute `Any` by `Char` * Adding `|`-syntax inside `[...]` as well * Remove compiler warning * Regenerating parser * Restored original parser * Rebuild parser from tokay.tok * Some tests and experiments Still unfinished. Trying several ways. * Starting with alternative list syntax This branch starts over with another syntax for lists, where the comma (,) becomes an operator with a meaning. * repr lists in brackets * Improving the new list (,) syntax - Clean-up and fixing grammar - Updating and investigating tests - Updating prelude * Implementing InlineExpressionList & InlineHoldAssignment * Fixing some testcases * Introducting InlineAssignment - InlineAssignment separates the assigned value on the stack - Enhanced dict.tok dests, fixes test suite in this branch for now * Improving inline syntax to just one path This commit makes InlineSequences as the only handler for content of brackets. This simplifies things and cleans up the syntax. Tests will be fixed soon. * Further experiments with the sequence/inline_sequence syntax Fixes more testcases * Distinguish inlined lists and sequences * Improving sequence, fixing tests/inline_parseable_sequence.tok * Replacing `inline_sequence` by just `sequence` Rebuiling prelude.rs using new tokay.tok resulted in smaller code. * Still unclear on sequence/list severity on inline syntax * Draft for a cleaner, less ambigous syntax for inlined list and sequence (dict) * assign_drop * Fixing tests/dict.tok for now * Optimizing Assignment parselets * Compacting tokay.tok by using generic Assignment parselet
- Loading branch information