[TxMt] Re: ruby bundle patch for magic heredoc tokens
Amiel Martin
amiel.martin at gmail.com
Thu Feb 19 22:00:06 UTC 2009
Update: http://pastie.org/394164
1. switched the following languages to use a magic heredoc token
instead of a comment.
In order to match, the heredoc token should END WITH the magic
string for that language.
The following are supported:
* HTML
* SQL
* CSS
* CPP
* C
* JS|JAVASCRIPT|JQUERY
* SH|SHELL
* RUBY
2. there was one way to trigger ruby scope, by have a heredoc token of *_EVAL
now, there are two options:
* foobar = <<-RUBY
* eval <<-FOOBAR # works with eval, module_eval and class_eval
3. spport for <<-'FOOBAR' and <<-"FOOBAR" although the non-interpolated
version is still scoped as an interpolated string
NOTES:
* in the case of *_eval, I don't know how to get the *_eval part not
to be scoped as part of the heredoc
* both C and SH can easily be the end of another word
for example: foo = <<-FOOLISH # <- matches as a shell script
TODO:
* support <<HEREDOC magic tokens for embedded languages
(for some reason <<-? isn't getting this)
On Thu, Feb 19, 2009 at 10:28 AM, Amiel Martin <amiel.martin at gmail.com>wrote:
> 1. switched the following languages to use a magic heredoc token instead of
> a comment
> 2. there was one way to trigger ruby scope, by have a heredoc token of
> *_EVAL
> now, there are two options:
> a. foobar = <<-RUBY
> b. eval <<-FOOBAR # works with eval, module_eval and class_eval
>
> TODO:
> * support <<-'HEREDOC' or <<-"HEREDOC" syntax for magic tokens for
> embedded languages
> * support <<HEREDOC magic tokens for embedded languages
>
> patch is attached, and can be found here: http://pastie.org/394164
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20090219/105b5dd4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruby_heredoc_tokens.patch
Type: application/octet-stream
Size: 13079 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20090219/105b5dd4/attachment.patch>
More information about the textmate
mailing list