[TxMt] Syntax Future with Injection

Thomas Aylott (subtleGradient) oblivious at subtlegradient.com
Tue Feb 27 15:14:31 UTC 2007


When we get the new scope injection system for syntaxes we should  
plan on making some big changes to the current state of many bundles.

We currently have a Ruby syntax, and the Rails syntax includes it.
The current Rails syntax seems to be targeted at Rails 1.1.x.
I'm torn about upgrading that syntax however.
On the one hand, the official Rails syntax should support the latest  
version of Rails, but I'd hate to introduce some incompatibilities  
with current applications written for Rails 1.1.x.

The new organizational method should be something like this.

Root language syntax
	Contains only the basic scopes for the language syntax itself and  
any built in language stuff.
Core library syntax injector
	Injects the core library support junk into the Root language syntax
Other Library syntax injectors
	EG: Rails 1.1.x injector, Rail 1.2 injector, Rails 2.0 injector,  
Camping injector, etc…
Personal syntax additions
	Inject support for all your personal libraries and classes and junk
Optional syntax niceties
	EG: Rails 1.2 deprecated code, nested brackets, leading space, etc...

That way all of the layers are nicely segregated from eachother.
Nothing can really change the basic Ruby syntax, so a single  
tmLanguage should scope the entire thing.
Then you can add stuff where you need it in a nicely segregated way.

thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070227/8c5f736f/attachment.html>


More information about the textmate mailing list