I want to implement outlining functionality for my language.
My language's IF statement is like this:
IF D < 0 THEN statement statement ELSIF D = 0 THEN statement statement ELSE statement statement END_IF;
Each IF/ELSIF/ELSE element is an outlining node.
Then, for example, if all nodes are closed, the code will look like this:
+ IF D < 0 THEN + ELSIF D = 0 THEN + ELSE END_IF;
An "ELSIF" token ends an outlining node for an IF element.
Furthermore, this "ELSIF" token starts another outlining node(outlining node for ELSIF element).
ELSIF/ELSE elements are optional.
So, when the ELSIF element is absent, an "ELSE" token ends an "IF" outlining node.
When both ELSIF and ELSE elements are absent, an "END_IF" token ends an "IF" outlining node.
Is there any way to achieve this using Token-Based Outlining Sources?
Or do I have to use Range-Based Outlining Sources?
[Modified 4 years ago]