On 4 Apr 2014, at 23:31, Matt Neuburg wrote:
[…] Unfortunately one can't mix named groups with implicitly numbered groups, so it's going to be named groups all the way […]
Just to be sure I understand, the issue here is that if you use named captures in the parent match, the $1-n variables are still created and inherited.
So there is no way around using named captures for conditionals in the format string, but in the parent rule, using named captures makes no difference.
I made the variables inherited for maximum flexibility, but given this issue, I have changed it so that $1-$n will not be inherited, where n == number of captures in the last regexp: https://github.com/textmate/textmate/commit/6185cc17ab59c81993983dffc9eb8229...
This means you can simplify the grammar after next build.