[TxMt] Confusion over captured group numbering

Hector Chu hkcc2 at cantab.net
Tue Apr 10 10:00:39 UTC 2007


Hi,

In the begin pattern for meta.preprocessor.macro.c (see
http://macromates.com/svn/Bundles/trunk/Bundles/C.tmbundle/Syntaxes/C.plist)
I count the following groups:

1: (define)
2: ((?<id>[a-zA-Z_][a-zA-Z0-9_]*))
3: (?<id>[a-zA-Z_][a-zA-Z0-9_]*)
4: (\()
5: ( \s* \g<id> \s* (, \s* \g<id> \s*)* (?:\.\.\.)? )
6: (, \s* \g<id> \s*)
7: (\))

This doesn't seem to match up with the order in beginCaptures, where 6
is given the scope punctuation.definition.parameters.c.  Shouldn't it
be 7 that is given that scope instead?

Regards,
Hector



More information about the textmate mailing list