[TxMt] Re: Grammar question

Michael Sheets mummer at whitefalls.org
Sat Mar 9 02:36:20 UTC 2013


On Mar 8, 2013, at 12:17 PM, Gerd Knops <gerti-textmate at bitart.com> wrote:

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

When you enter a begin/end only those rules inside the pattern block and the end pattern are active. So when you enter the second one in your example the end pattern isn't being checked anymore. It's not possible to directly do what you want, no. The workaround is to have special end rules in the sub-patterns that check for the normal end and the parents end in a look-ahead. Of course this makes them not as reusable.


More information about the textmate mailing list