Permalink
Browse files

CoffeeScript 1.3.3

  • Loading branch information...
1 parent e3454ed commit 79492aab362e7af0279579d69c6d68525bbb7147 @jashkenas committed May 15, 2012
Showing with 84 additions and 72 deletions.
  1. +1 −1 documentation/coffee/block_comment.coffee
  2. +1 −1 documentation/docs/coffee-script.html
  3. +2 −1 documentation/docs/nodes.html
  4. +13 −2 documentation/docs/repl.html
  5. +3 −3 documentation/index.html.erb
  6. +1 −1 documentation/js/aliases.js
  7. +1 −1 documentation/js/array_comprehensions.js
  8. +2 −2 documentation/js/block_comment.js
  9. +1 −1 documentation/js/cake_tasks.js
  10. +1 −1 documentation/js/classes.js
  11. +1 −1 documentation/js/comparisons.js
  12. +1 −1 documentation/js/conditionals.js
  13. +1 −1 documentation/js/default_args.js
  14. +1 −1 documentation/js/do.js
  15. +1 −1 documentation/js/embedded.js
  16. +1 −1 documentation/js/existence.js
  17. +1 −1 documentation/js/expressions.js
  18. +1 −1 documentation/js/expressions_assignment.js
  19. +1 −1 documentation/js/expressions_comprehension.js
  20. +1 −1 documentation/js/expressions_try.js
  21. +1 −1 documentation/js/fat_arrow.js
  22. +1 −1 documentation/js/functions.js
  23. +1 −1 documentation/js/heredocs.js
  24. +1 −1 documentation/js/heregexes.js
  25. +1 −1 documentation/js/interpolation.js
  26. +1 −1 documentation/js/multiple_return_values.js
  27. +1 −1 documentation/js/object_comprehensions.js
  28. +1 −1 documentation/js/object_extraction.js
  29. +1 −1 documentation/js/objects_and_arrays.js
  30. +1 −1 documentation/js/objects_reserved.js
  31. +1 −1 documentation/js/overview.js
  32. +1 −1 documentation/js/parallel_assignment.js
  33. +1 −1 documentation/js/patterns_and_splats.js
  34. +1 −1 documentation/js/prototypes.js
  35. +1 −1 documentation/js/range_comprehensions.js
  36. +1 −1 documentation/js/scope.js
  37. +1 −1 documentation/js/slices.js
  38. +1 −1 documentation/js/soaks.js
  39. +1 −1 documentation/js/splats.js
  40. +1 −1 documentation/js/splices.js
  41. +1 −1 documentation/js/strings.js
  42. +1 −1 documentation/js/switch.js
  43. +1 −1 documentation/js/try.js
  44. +1 −1 documentation/js/while.js
  45. +2 −2 extras/coffee-script.js
  46. +6 −6 index.html
  47. +1 −1 lib/coffee-script/browser.js
  48. +1 −1 lib/coffee-script/cake.js
  49. +2 −2 lib/coffee-script/coffee-script.js
  50. +1 −1 lib/coffee-script/command.js
  51. +1 −1 lib/coffee-script/grammar.js
  52. +1 −1 lib/coffee-script/helpers.js
  53. +1 −1 lib/coffee-script/index.js
  54. +1 −1 lib/coffee-script/lexer.js
  55. +1 −1 lib/coffee-script/nodes.js
  56. +1 −1 lib/coffee-script/optparse.js
  57. +1 −1 lib/coffee-script/repl.js
  58. +1 −1 lib/coffee-script/rewriter.js
  59. +1 −1 lib/coffee-script/scope.js
  60. +1 −1 package.json
  61. +1 −1 src/coffee-script.coffee
@@ -1,5 +1,5 @@
###
-CoffeeScript Compiler v1.3.2
+CoffeeScript Compiler v1.3.3
Released under the MIT License
###
@@ -13,7 +13,7 @@
<span class="nv">content = </span><span class="nx">compile</span> <span class="nx">fs</span><span class="p">.</span><span class="nx">readFileSync</span><span class="p">(</span><span class="nx">filename</span><span class="p">,</span> <span class="s1">&#39;utf8&#39;</span><span class="p">),</span> <span class="p">{</span><span class="nx">filename</span><span class="p">}</span>
<span class="nx">module</span><span class="p">.</span><span class="nx">_compile</span> <span class="nx">content</span><span class="p">,</span> <span class="nx">filename</span>
<span class="k">else</span> <span class="k">if</span> <span class="nx">require</span><span class="p">.</span><span class="nx">registerExtension</span>
- <span class="nx">require</span><span class="p">.</span><span class="nx">registerExtension</span> <span class="s1">&#39;.coffee&#39;</span><span class="p">,</span> <span class="nf">(content) -&gt;</span> <span class="nx">compile</span> <span class="nx">content</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>The current CoffeeScript version number.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.VERSION = </span><span class="s1">&#39;1.3.2&#39;</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Words that cannot be used as identifiers in CoffeeScript code</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.RESERVED = </span><span class="nx">RESERVED</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">&#182;</a> </div> <p>Expose helpers for testing.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.helpers = </span><span class="nx">require</span> <span class="s1">&#39;./helpers&#39;</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">&#182;</a> </div> <p>Compile a string of CoffeeScript code to JavaScript, using the Coffee/Jison
+ <span class="nx">require</span><span class="p">.</span><span class="nx">registerExtension</span> <span class="s1">&#39;.coffee&#39;</span><span class="p">,</span> <span class="nf">(content) -&gt;</span> <span class="nx">compile</span> <span class="nx">content</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>The current CoffeeScript version number.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.VERSION = </span><span class="s1">&#39;1.3.3&#39;</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Words that cannot be used as identifiers in CoffeeScript code</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.RESERVED = </span><span class="nx">RESERVED</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">&#182;</a> </div> <p>Expose helpers for testing.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.helpers = </span><span class="nx">require</span> <span class="s1">&#39;./helpers&#39;</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">&#182;</a> </div> <p>Compile a string of CoffeeScript code to JavaScript, using the Coffee/Jison
compiler.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.compile = compile = </span><span class="nf">(code, options = {}) -&gt;</span>
<span class="p">{</span><span class="nx">merge</span><span class="p">}</span> <span class="o">=</span> <span class="nx">exports</span><span class="p">.</span><span class="nx">helpers</span>
<span class="k">try</span>
@@ -384,7 +384,8 @@
<span class="p">(</span><span class="k">new</span> <span class="nx">Value</span> <span class="p">(</span><span class="k">new</span> <span class="nx">Literal</span> <span class="nx">method</span><span class="p">.</span><span class="nx">klass</span><span class="p">),</span> <span class="nx">accesses</span><span class="p">).</span><span class="nx">compile</span> <span class="nx">o</span>
<span class="k">else</span>
<span class="s2">&quot;#{name}.__super__.constructor&quot;</span></pre></div> </td> </tr> <tr id="section-50"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-50">&#182;</a> </div> <p>The appropriate <code>this</code> value for a <code>super</code> call.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">superThis : </span><span class="nf">(o) -&gt;</span>
- <span class="nx">o</span><span class="p">.</span><span class="nx">scope</span><span class="p">.</span><span class="nx">method</span><span class="o">?</span><span class="p">.</span><span class="nx">context</span> <span class="o">or</span> <span class="s2">&quot;this&quot;</span></pre></div> </td> </tr> <tr id="section-51"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-51">&#182;</a> </div> <p>Soaked chained invocations unfold into if/else ternary structures.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">unfoldSoak: </span><span class="nf">(o) -&gt;</span>
+ <span class="nv">method = </span><span class="nx">o</span><span class="p">.</span><span class="nx">scope</span><span class="p">.</span><span class="nx">method</span>
+ <span class="p">(</span><span class="nx">method</span> <span class="o">and</span> <span class="o">not</span> <span class="nx">method</span><span class="p">.</span><span class="nx">klass</span> <span class="o">and</span> <span class="nx">method</span><span class="p">.</span><span class="nx">context</span><span class="p">)</span> <span class="o">or</span> <span class="s2">&quot;this&quot;</span></pre></div> </td> </tr> <tr id="section-51"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-51">&#182;</a> </div> <p>Soaked chained invocations unfold into if/else ternary structures.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">unfoldSoak: </span><span class="nf">(o) -&gt;</span>
<span class="k">if</span> <span class="nx">@soak</span>
<span class="k">if</span> <span class="nx">@variable</span>
<span class="k">return</span> <span class="nx">ifn</span> <span class="k">if</span> <span class="nv">ifn = </span><span class="nx">unfoldSoak</span> <span class="nx">o</span><span class="p">,</span> <span class="k">this</span><span class="p">,</span> <span class="s1">&#39;variable&#39;</span>
@@ -23,7 +23,11 @@
<span class="nv">val = </span><span class="nx">Script</span><span class="p">.</span><span class="nx">runInThisContext</span> <span class="nx">obj</span>
<span class="k">catch</span> <span class="nx">error</span>
<span class="k">return</span>
- <span class="nv">completions = </span><span class="nx">getCompletions</span> <span class="nx">prefix</span><span class="p">,</span> <span class="p">(</span><span class="nx">key</span> <span class="k">for</span> <span class="nx">key</span> <span class="k">of</span> <span class="nb">Object</span><span class="p">(</span><span class="nx">val</span><span class="p">))</span>
+ <span class="nv">val = </span><span class="nb">Object</span> <span class="nx">val</span>
+ <span class="nv">possibilities = </span><span class="nb">Object</span><span class="p">.</span><span class="nx">getOwnPropertyNames</span> <span class="nx">val</span>
+ <span class="k">for</span> <span class="nx">key</span> <span class="k">of</span> <span class="nx">val</span> <span class="k">when</span> <span class="o">~</span><span class="nx">possibilities</span><span class="p">.</span><span class="nx">indexOf</span> <span class="nx">val</span>
+ <span class="nx">possibilities</span><span class="p">.</span><span class="nx">push</span> <span class="nx">key</span>
+ <span class="nv">completions = </span><span class="nx">getCompletions</span> <span class="nx">prefix</span><span class="p">,</span> <span class="nx">possibilities</span>
<span class="p">[</span><span class="nx">completions</span><span class="p">,</span> <span class="nx">prefix</span><span class="p">]</span></pre></div> </td> </tr> <tr id="section-11"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-11">&#182;</a> </div> <p>Attempt to autocomplete an in-scope free variable: <code>one</code>.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">completeVariable = </span><span class="nf">(text) -&gt;</span>
<span class="nv">free = </span><span class="nx">text</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="nx">SIMPLEVAR</span><span class="p">)</span><span class="o">?</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="nv">free = </span><span class="s2">&quot;&quot;</span> <span class="k">if</span> <span class="nx">text</span> <span class="o">is</span> <span class="s2">&quot;&quot;</span>
@@ -74,8 +78,15 @@
<span class="kc">on</span><span class="o">:</span> <span class="o">-&gt;</span>
<span class="nx">stdin</span><span class="p">.</span><span class="kc">on</span> <span class="s1">&#39;data&#39;</span><span class="p">,</span> <span class="nf">(chunk) -&gt;</span>
<span class="nx">pipedInput</span> <span class="o">+=</span> <span class="nx">chunk</span>
+ <span class="k">return</span> <span class="nx">unless</span> <span class="sr">/\n/</span><span class="p">.</span><span class="nx">test</span> <span class="nx">pipedInput</span>
+ <span class="nv">lines = </span><span class="nx">pipedInput</span><span class="p">.</span><span class="nx">split</span> <span class="s2">&quot;\n&quot;</span>
+ <span class="nv">pipedInput = </span><span class="nx">lines</span><span class="p">[</span><span class="nx">lines</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span>
+ <span class="k">for</span> <span class="nx">line</span> <span class="k">in</span> <span class="nx">lines</span><span class="p">[...</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="k">when</span> <span class="nx">line</span>
+ <span class="nx">stdout</span><span class="p">.</span><span class="nx">write</span> <span class="s2">&quot;#{line}\n&quot;</span>
+ <span class="nx">run</span> <span class="nx">line</span>
+ <span class="k">return</span>
<span class="nx">stdin</span><span class="p">.</span><span class="kc">on</span> <span class="s1">&#39;end&#39;</span><span class="p">,</span> <span class="o">-&gt;</span>
- <span class="k">for</span> <span class="nx">line</span> <span class="k">in</span> <span class="nx">pipedInput</span><span class="p">.</span><span class="nx">trim</span><span class="p">().</span><span class="nx">split</span> <span class="s2">&quot;\n&quot;</span>
+ <span class="k">for</span> <span class="nx">line</span> <span class="k">in</span> <span class="nx">pipedInput</span><span class="p">.</span><span class="nx">trim</span><span class="p">().</span><span class="nx">split</span> <span class="s2">&quot;\n&quot;</span> <span class="k">when</span> <span class="nx">line</span>
<span class="nx">stdout</span><span class="p">.</span><span class="nx">write</span> <span class="s2">&quot;#{line}\n&quot;</span>
<span class="nx">run</span> <span class="nx">line</span>
<span class="nx">stdout</span><span class="p">.</span><span class="nx">write</span> <span class="s1">&#39;\n&#39;</span>
@@ -136,7 +136,7 @@
<p>
<b>Latest Version:</b>
- <a href="http://github.com/jashkenas/coffee-script/tarball/1.3.2">1.3.2</a>
+ <a href="http://github.com/jashkenas/coffee-script/tarball/1.3.3">1.3.3</a>
</p>
<h2>
@@ -1111,8 +1111,8 @@ Expressions
<p>
<b class="header" style="margin-top: 20px;">
- <a href="https://github.com/jashkenas/coffee-script/compare/1.3.1...1.3.2">1.3.2</a>
- <span class="timestamp"> &ndash; <small>May 14, 2012</small></span>
+ <a href="https://github.com/jashkenas/coffee-script/compare/1.3.1...1.3.3">1.3.3</a>
+ <span class="timestamp"> &ndash; <small>May 15, 2012</small></span>
</b>
<ul>
<li>

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 79492aa

Please sign in to comment.