The nesting structure extension
is running before the assignment of the nesting level for tokens.
The solution is to increment the nesting level
right at the end of control-flow structure declaration
but before its body.
In addition,
the token is yielded before being processed by the NS extension
to simulate running the extension after the code reader,
but this is somewhat hacky.
This bug (surprisingly) has been a feature!
The fix broke the gotcha braceless nested if-then-else structures.
As a result, separate handling of these "paired" structures is implemented.
The nesting structure extension is running before the assignment of the nesting level for tokens. The solution is to increment the nesting level right at the end of control-flow structure declaration but before its body.
In addition, the token is yielded before being processed by the NS extension to simulate running the extension after the code reader, but this is somewhat hacky.
This bug (surprisingly) has been a feature! The fix broke the gotcha braceless nested if-then-else structures. As a result, separate handling of these "paired" structures is implemented.
Fixes #157.
This change is