Skip to content

Pattern Backtracking

Pre-release
Pre-release
Compare
Choose a tag to compare
@Moderocky Moderocky released this 28 Apr 11:09
· 39 commits to master since this release

This draft supports pattern backtracking.
This will slow down parsing slightly, but it prevents errors where one syntax includes another.
An example of this would be maths expressions inside strings like "hello + " + "there".

If the first (wrong) match fails (e.g. "hello and " + "there") then it will backtrack to the last successful pattern and attempt another variant (e.g. "hello + " and "there".)

There may be some potential errors when using the Divide / expression with brackets. Fixing this will require renegotiating how patterns work.