mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
merge master (#4597)
This commit is contained in:
parent
704924c3cd
commit
8ea7edf02a
4 changed files with 12 additions and 3 deletions
|
@ -615,7 +615,7 @@ pre .xml .cdata {
|
|||
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/1.12.6">1.12.6</a></p>
|
||||
<blockquote class="uneditable-code-block"><pre><code class="language-bash">npm install -g coffeescript
|
||||
</code></pre>
|
||||
</blockquote><p><strong>CoffeeScript 2 is coming!</strong> It adds support for <a href="/v2/#classes">ES2015 classes</a>, <a href="/v2/#fat-arrow"><code>async</code>/<code>await</code></a>, and generates JavaScript using ES2015+ syntax. <a href="/v2/">Learn more</a>.</p></p>
|
||||
</blockquote><p><strong>CoffeeScript 2 is coming!</strong> It adds support for <a href="/v2/#classes">ES2015 classes</a>, <a href="/v2/#fat-arrow"><code>async</code>/<code>await</code></a>, <a href="/v2/#jsx">JSX</a>, <a href="/v2/#splats">object rest/spread syntax</a>, and generates JavaScript using ES2015+ syntax. <a href="/v2/">Learn more</a>.</p></p>
|
||||
|
||||
<h2>Overview</h2>
|
||||
<p><em>CoffeeScript on the left, compiled JavaScript output on the right.</em></p>
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
ours: true
|
||||
}
|
||||
]);
|
||||
return tokens.splice(idx, 0, generate('CALL_START', '('));
|
||||
return tokens.splice(idx, 0, generate('CALL_START', '(', ['', 'implicit function call', token[2]]));
|
||||
};
|
||||
endImplicitCall = function() {
|
||||
stack.pop();
|
||||
|
|
|
@ -164,7 +164,7 @@ exports.Rewriter = class Rewriter
|
|||
|
||||
startImplicitCall = (idx) ->
|
||||
stack.push ['(', idx, ours: yes]
|
||||
tokens.splice idx, 0, generate 'CALL_START', '('
|
||||
tokens.splice idx, 0, generate 'CALL_START', '(', ['', 'implicit function call', token[2]]
|
||||
|
||||
endImplicitCall = ->
|
||||
stack.pop()
|
||||
|
|
|
@ -1627,3 +1627,12 @@ test "#3906: error for unusual indentation", ->
|
|||
c
|
||||
^^
|
||||
'''
|
||||
|
||||
test "#4283: error message for implicit call", ->
|
||||
assertErrorFormat '''
|
||||
(a, b c) ->
|
||||
''', '''
|
||||
[stdin]:1:5: error: unexpected implicit function call
|
||||
(a, b c) ->
|
||||
^
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue