Hi there,
I've got a new language for which I'd like to create a new grammar. It's a LaTeX alike language, but environments look like this:
\startsomething
\stopsomething
The language grammar doesn't seem to accept the backslash (it does so in the LaTeX bundle, so I must be doing something wrong). The following works fine:
{ name = 'meta.foo.bar'; begin = 'xx'; end = 'yy'; },
and in my text between 'xx' and 'yy' the scope is also 'meta.foo.bar'. But when I chage the grammar to
{ name = 'meta.foo.bar'; begin = '\xx'; end = '\yy'; }, I can't see that the scope changes to 'meta.foo.bar' within \xx and \yy. Can somebody tell me what to do?
Patrick
Hi again,
sorry for the noise, I defined \\w+ as something else and didn't include the top level in the patterns. Thererfore \start... was never matched.
Patrick
I can't see that the scope changes to 'meta.foo.bar' within \xx and \yy. Can somebody tell me what to do?
Looks fine to me, I'd tend to think something else in the grammar is conflicting or something like that. Paste the whole grammar to pastie (opt-control-shift-V) as well as a sample file where it breaks so we can better help diagnose it.
On Sep 4, 2006, at 8:18 AM, Patrick Gundlach wrote:
Hi there, But when I chage the grammar to
{ name = 'meta.foo.bar'; begin = '\\xx'; end = '\\yy'; },
I can't see that the scope changes to 'meta.foo.bar' within \xx and \yy. Can somebody tell me what to do?
What you describe should work. Make sure you click on "Test" after you make the change.
Patrick
Haris