2.6.1 (#5381) · jashkenas/coffeescript@ed6733d
@@ -1009,11 +1009,12 @@ <h3 id="base">Base</h3>
10091009<div class="sswrap ">
10101010<a class="ss" href="#section-42">§</a>
10111011</div>
1012-<p><code>jumps</code> tells you if an expression, or an internal part of an expression
1013-has a flow control construct (like <code>break</code>, or <code>continue</code>, or <code>return</code>,
1014-or <code>throw</code>) that jumps out of the normal flow of control and can’t be
1015-used as a value. This is important because things like this make no sense;
1016-we have to disallow them.</p>
1012+<p><code>jumps</code> tells you if an expression, or an internal part of an expression,
1013+has a flow control construct (like <code>break</code>, <code>continue</code>, or <code>return</code>)
1014+that jumps out of the normal flow of control and can’t be used as a value.
1015+(Note that <code>throw</code> is not considered a flow control construct.)
1016+This is important because flow control in the middle of an expression
1017+makes no sense; we have to disallow it.</p>
1017101810181019</div>
10191020@@ -1350,13 +1351,8 @@ <h3 id="root">Root</h3>
13501351 @initializeScope o
13511352 fragments = @body.compileRoot o
13521353<span class="hljs-keyword">return</span> fragments <span class="hljs-keyword">if</span> o.bare
1353- parts = []
1354- parts.push @makeCode <span class="hljs-string">'('</span>
1355- parts.push @makeCode <span class="hljs-string">'async '</span> <span class="hljs-keyword">if</span> @isAsync
1356- parts.push @makeCode <span class="hljs-string">'function() {\n'</span>
1357- parts.push ...fragments
1358- parts.push @makeCode <span class="hljs-string">'\n}).call(this);\n'</span>
1359- [].concat ...parts
1354+ functionKeyword = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-keyword">if</span> @isAsync <span class="hljs-keyword">then</span> <span class="hljs-string">'async '</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>}</span>function"</span>
1355+ [].concat @makeCode(<span class="hljs-string">"(<span class="hljs-subst">#{functionKeyword}</span>() {\n"</span>), fragments, @makeCode(<span class="hljs-string">"\n}).call(this);\n"</span>)
1360135613611357 initializeScope: <span class="hljs-function"><span class="hljs-params">(o)</span> -></span>
13621358 o.scope = <span class="hljs-keyword">new</span> Scope <span class="hljs-literal">null</span>, @body, <span class="hljs-literal">null</span>, o.referencedVars ? []</pre></div></div>
@@ -9055,7 +9051,7 @@ <h3 id="try">Try</h3>
9055905190569052 isStatement: YES
905790539058- jumps: <span class="hljs-function"><span class="hljs-params">(o)</span> -></span> @recovery.jumps(o)
9054+ jumps: <span class="hljs-function"><span class="hljs-params">(o)</span> -></span> @recovery.jumps o
9059905590609056 makeReturn: <span class="hljs-function"><span class="hljs-params">(results, mark)</span> -></span>
90619057 ret = @recovery.makeReturn results, mark