[SVN] bundle regexp question

Eric Hsu erichsu at math.sfsu.edu
Fri Jun 10 01:20:53 UTC 2005


> 1. Ruby special-cases () [] <> and {}; might wanna check whether  
> perl supports those too.

Ah, I hadn't noticed that <> worked as a special case. Knowing Perl  
there are many more...

> 2. Ruby also highlights the prefix. This is consistent with the  
> highlighting of the at-sign at the start of a constant NSString  
> (@"Turnips!") in Objective-C. None of this was intentional, though,  
> and I don't feel strongly about it. I'll update Ruby, at least, to  
> whatever you come up with.
> You might try something like:
> beginCaptures = {"keyword.string-prefix"}; // or whatever

I fiddled with it and
             begin = "(qq)(.)";
...
             beginCaptures = { 1 = { name =  
"keyword.function.perl"; }; };

worked great. However, it looks a little weird to me, even if BBEdit  
colors it this way. My reasoning is that "foo" and 'bar' have the  
quotes in the Quote scope (and hence the same coloring). So my  
current vote is that quote functions should be colored as part of the  
quote.

Crash note: using beginCaptures  = "keyword.function.perl"; is a  
creative way to instantly crash TextMate on use of that syntax file.  
Allan, you will eventually probably want to have the "Test" button  
check that values are of the right type...

---
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu at math.sfsu.edu
http://math.sfsu.edu/hsu




More information about the textmate-dev mailing list