[SVN] Improving the Ruby Syntax
Allan Odgaard
allan at macromates.com
Tue Mar 8 15:30:32 UTC 2005
On Mar 8, 2005, at 5:05, Chris Thomas wrote:
> So I'm curious, then. Could I do something like, for example:
>
> /* HERE document containing Ruby code ("doc=<<END # mode Ruby") */
> begin = "(?=<<(\\w+))\\s+#\\s*mode\\s+[Rr]uby"; end = "^\\1";
> include = "source.ruby"
> ...
Yes, though it should be:
/* HERE document containing Ruby code ("doc=<<END # mode Ruby") */
begin = "<<(\\w+)\\s+#\\s*mode\\s+[Rr]uby"; end = "^\\1";
patterns = ( { include = "source.ruby"; } );
...
I.e. no look-ahead assertion in the begin-pattern, and the include done
as the first sub-rule.
More information about the textmate-dev
mailing list