Closed boyland closed 4 years ago
The v2 "parser" is an anachronism that's being replaced for v3. There are no plans to perform major surgery on any of it, so don't get your hopes up.
Parsing misfeature: It would be nice if
<</link><<else>>
would generate an error rather than silently be treated as a legal synonym for<</link>>
.
That I should be able to swing.
I don't have any opinions on v2 versus v3. Is v3 intended to be a newly architectured parser for the same (or slightly updated) language specification? In that case, it's unlikely to have the same bugs (good). I appreciate that it might be able to generate errors for "obviously" broken tags. I'm trying to do the same in my Eclipse plugin for SugarCube.
Is v3 intended to be a newly architectured parser for the same (or slightly updated) language specification? In that case, it's unlikely to have the same bugs (good).
The current plan for SugarCube v3 is to switch to a separate lexer and parser design, rather than the combined parser design that v2 currently uses.
For reference, the relevant parsing issue for SugarCube v3 is: tmedwards/sugarcube-3#4
I was trying to determine why an
<<if>>
macro was failing and was commenting out parts in the middle and it still failed. It turns out that a<</link>>
was missing one of its closing greater-than signs and so it snarfed up the<<else>>
token.The output is:
I think this is a parsing bug and a parsing mis-feature:
<</link>--><<else>>
<</link><<else>>
would generate an error rather than silently be treated as a legal synonym for<</link>>
.