Open kaby76 opened 1 month ago
I guess you mean the spacing of the alt that is not adjusted when there's no space after the opening par, like in the another_binding_attr
rule?
I guess you mean the spacing of the alt that is not adjusted when there's no space after the opening par, like in the
another_binding_attr
rule?
Yes. in another_bindnig_attr.
Here is a grammar with some various spaces in alt indentation, before and after parentheses.
When I reformat the grammar, spacing is adjusted to be consistent for alt indentation, and for spacing before
")"
. But, the spacing following"("
is only readjusted if there are iniitally some spaces following the"("
. If there is no space following a left parenthesis initially, spacing is not readjusted.I can work around this inconsistency by adding a space after every LPAREN in the Antlr4 grammar (using Trash,
trparse -t ANTLRv4 *.g4 | trquery insert after ' //LPAREN' '" "' | trsponge -c
) prior to reformatting.