Is it possible to use "\z" in the Language Grammer? I'm thinking like this:
name = 'meta.test'; match = '^(\t)(.+)(\n|\z)'; captures = { 1 = { name = 'whitespace'; }; 2 = { name = 'paragraph'; }; 3 = { name = 'end-of-line'; }; }
I know I can't currently do this, is it because I don't understand "\z" or because TextMate doesn't support it? If TM doesn't support it, why? (I think this would be really useful)
On Oct 30, 2006, at 12:28 PM, Oliver Taylor wrote:
Is it possible to use "\z" in the Language Grammer? I'm thinking like this:
I know I can't currently do this, is it because I don't understand "\z" or because TextMate doesn't support it? If TM doesn't support it, why? (I think this would be really useful)
\z should really be the end of the file, but because Textmate only hands off one line at a time to the parser it really means end-of- line. ie: \z and $ are identical.
Currently you can't reliably catch the end-of-file case, $(?!\n) works for most cases there there is something on the last line, but when there is no characters on the last line there is nothing to match.