<pre class="textmate-source"><pre class="sunburst"><span class="meta meta_paragraph meta_paragraph_text">Update: </span><a href="http://pastie.org/394164">http://pastie.org/394164</a><br><span class="meta meta_paragraph meta_paragraph_text"><br>
1. switched the following languages to use a magic heredoc token instead of a comment.<br></span> <span class="meta meta_paragraph meta_paragraph_text">In order to match, the heredoc token should END WITH the magic string for that language.<br>
The following are supported:<br></span><span class="meta meta_bullet-point meta_bullet-point_star"> * HTML</span><br><span class="meta meta_bullet-point meta_bullet-point_star"> * SQL</span><br><span class="meta meta_bullet-point meta_bullet-point_star"> * CSS</span><br>
<span class="meta meta_bullet-point meta_bullet-point_star"> * CPP</span><br><span class="meta meta_bullet-point meta_bullet-point_star"> * C</span><br><span class="meta meta_bullet-point meta_bullet-point_star"> * JS|JAVASCRIPT|JQUERY</span><br>
<span class="meta meta_bullet-point meta_bullet-point_star"> * SH|SHELL</span><br><span class="meta meta_bullet-point meta_bullet-point_star"> * RUBY</span><br><span class="meta meta_paragraph meta_paragraph_text">2. there was one way to trigger ruby scope, by have a heredoc token of *_EVAL<br>
</span> <span class="meta meta_paragraph meta_paragraph_text">now, there are two options:<br></span><span class="meta meta_bullet-point meta_bullet-point_star"> * foobar = <<-RUBY</span><br><span class="meta meta_bullet-point meta_bullet-point_star"> * eval <<-FOOBAR # works with eval, module_eval and class_eval</span><br>
<span class="meta meta_paragraph meta_paragraph_text">3. spport for <<-'FOOBAR' and <<-"FOOBAR" although the non-interpolated<br></span> <span class="meta meta_paragraph meta_paragraph_text">version is still scoped as an interpolated string<br>
</span><br><span class="meta meta_paragraph meta_paragraph_text">NOTES:<br></span><span class="meta meta_bullet-point meta_bullet-point_star"> * in the case of *_eval, I don't know how to get the *_eval part not</span><br>
<span class="meta meta_paragraph meta_paragraph_text">to be scoped as part of the heredoc<br></span><span class="meta meta_bullet-point meta_bullet-point_star"> * both C and SH can easily be the end of another word</span><br>
<span class="meta meta_paragraph meta_paragraph_text">for example: foo = <<-FOOLISH # <- matches as a shell script<br></span><br><span class="meta meta_paragraph meta_paragraph_text">TODO:<br></span><span class="meta meta_bullet-point meta_bullet-point_star"> * support <<HEREDOC magic tokens for embedded languages</span><br>
<span class="meta meta_paragraph meta_paragraph_text">(for some reason <<-? isn't getting this)<br></span></pre></pre><br><br><br><div class="gmail_quote">On Thu, Feb 19, 2009 at 10:28 AM, Amiel Martin <span dir="ltr"><<a href="mailto:amiel.martin@gmail.com">amiel.martin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">1. switched the following languages to use a magic heredoc token instead of a comment<br>2. there was one way to trigger ruby scope, by have a heredoc token of *_EVAL<br>
now, there are two options:<br> a. foobar = <<-RUBY<br>
b. eval <<-FOOBAR # works with eval, module_eval and class_eval<br><br>TODO:<br> * support <<-'HEREDOC' or <<-"HEREDOC" syntax for magic tokens for embedded languages<br> * support <<HEREDOC magic tokens for embedded languages<br>
<br>patch is attached, and can be found here: <a href="http://pastie.org/394164" target="_blank">http://pastie.org/394164</a><br><br>
</blockquote></div><br>