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
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@gmail.comwrote:
- 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
On Feb 19, 2009, at 4:00 PM, Amiel Martin wrote:
Update: http://pastie.org/394164
I've commented these changes with three small changes:
* I dropped support for <<THIS_STYLE * I dropped support for <<-'THIS_STYLE' * I removed the eval code for now (I believe this can be fixed with lookbehind assertions if you want to add it back)
Thanks for the patch.
James Edward Gray II