Closed maetl closed 1 year ago
The work done in #5 goes some way towards this, but I can’t remember exactly what I did or how far I got with testing, so will need to go through it step by step.
Looks like this is complete for now. I will confirm and close this once I have a couple of end-to-end tests working.
Feature
Support unique cycle nodes and expression syntax. This allows rule expansions to cycle through evaluating each possible branch until reaching
Syntax
Cycles are embedded as template expressions using the
$
sigil as a prefix.Implementation
Requires adding a
Uniq
syntax node class and some additional processing to the registry.Previous implementations expanded a unique rule symbol by evaluating it and checking that it hadn’t previously been selected. This is poorly designed and doesn’t guarantee halting, so it would be nice to improve the algorithm rather than re-implement is as-is (presumably with a bit of temp state storage).
Edge Cases & Specification