[TxMt] Grammar question

Gerd Knops gerti-textmate at bitart.com
Fri Mar 8 18:17:02 UTC 2013


Hi,

I have a grammar where a definition starts with a certain sequence, and the definition is ended with an empty line (optionally containing whitespace):

{
	begin = 'PATTERN';
	end = '^\s*$';
	patterns = ( { include = '#some-stuff'; } );
}, 


My problem is that some of the repository rules in '#some-stuff' define blocks (eg { ... } ), and these blocks seem to 'escape' the frame set by the rule above and eat up empty lines. Example:

PATTERN my first rule

PATTERN my second rule

PATTERN { not actually starting a block because followed by empty line

PATTERN } not actually the end of the block because preceded by empty line

So here the problem is that TM interprets the { } as block, even though the 'outer' rule should limit the part parsed by the repository rules to the empty lines between the last two definitions.

Any way to fix this?

Thanks

Gerd



More information about the textmate mailing list