[TxMt] Language Grammar

Teifion Jordan sarkalian at gmail.com
Thu Apr 24 16:38:26 UTC 2008


I am trying to add a clause to my PHP language grammar that only  
affects a variable between square brackets/braces, for example it  
would match $bar from the following


The language block I have is this

		var_index = {
			name = 'variable.other.index.php';
			match = '(?x)
			captures = { 1 = { name =  
'punctuation.definition.variable.php'; }; };

The problem is that it affects the square brackets/braces as well as  
the variable inside them. How do I alter it to only affect the  
variable and not the brackets/braces?

Thanks in advance for any help


More information about the textmate mailing list