[SVN] r6982 (Experimental, Ruby)

James Edward Gray II james at grayproductions.net
Thu Apr 19 18:55:13 UTC 2007


On Apr 12, 2007, at 9:00 PM, Thomas Aylott wrote:

> Moved a large number of innocent scopes from Ruby Experimental to  
> Ruby.

Is it this change that has Ruby highlighting a lot more method calls?

I've noticed that I now see highlighting for things like assert,  
valid?, errors, invalid?, etc.  I don't remember these being caught  
by the syntax until recently.  These calls are caught by these new  
rules:  meta.function-call.method.with-arguments.ruby, meta.function- 
call.method.without-arguments.ruby, meta.function-call.ruby.

First, just a few questions.  Why are we doing this?  We want to  
scope all function calls to aid in command building?  We want to  
dramatically increase syntax highlighting?  Both?  Something else?   
Just to be clear, I'm not complaining here, yet.  I'm just trying to  
understand the goals.

Second, this definitely changes the behavior of the Ruby grammar in  
places.  For a trivial example, create a Ruby document and enter:

   SomeClass.new

Now if you go into the Ruby grammar and disable the rule  
meta.function-call.method.without-arguments.ruby, the new() call will  
be scoped very differently.

I think we should discuss the goals of this patch and if we are  
achieving them in the best possible ways.  The Ruby grammar is quite  
complex and handles many edge cases.  Making large changes to it is  
pretty risky and should be well planned, I think.

James Edward Gray II




More information about the textmate-dev mailing list