Pattern Backtracking
Pre-release
Pre-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.