Comparing changes
Open a pull request
|
|
geraldalewis |
Issue #2211 -- splats in destructured parameters
|
c573776
|
|
|
hickford |
build on Windows - fix spawn command by calling node explicitly
|
7e32c32
|
|
|
michaelficarra |
fixes #2255: global leak with splatted @-params
|
53a82da
|
|||
|
|
josher19 |
See issue #2620
|
ea60dfa
|
|||
|
|
michaelficarra |
Merge pull request #2261 from josher19/patch-2
|
eabcb2c
|
|
|
michaelficarra |
corrections for octal escape sequences; allows "\0" alone; see #1547
Relevant sections of the spec: * http://es5.github.com/#C * http://es5.github.com/#B.1.2 * http://es5.github.com/#x7.8.4 |
46ff770
|
|
|
jashkenas |
Merge pull request #2213 from geraldalewis/2211-destructed-splats
Issue #2211 -- splats in destructured parameters |
0fada51
|
|||
|
|
TrevorBurnham |
Intermediate version bump to 1.3.2-pre
|
d58da49
|
|||
|
|
TrevorBurnham |
Hidden files no longer queued for --join (fixes #2263)
|
3b1a566
|
|
|
maxtaco |
Reapply the removed patch from bugfix_1183 in PR 2252. Include a test
case to show it's required. What's going on: inside of Coffee-generated closures, calling `super()` is implicitly making use of `this` (or explicitly doing so if you look at the output code), so we have to pass `this` through closures as if `@` is being accessed within the closure. So, just add one more condition to the list in `Closure::literalThis` |
3e95d7f
|
|||
|
|
jashkenas |
Fixes #2207 -- unambiguous immediate implicit closes don't close impl…
…icit objects |
6bcc798
|
|||
|
|
jashkenas |
Fixes #2209 -- document heredocs as 'block strings'
|
c1309e1
|
|||
|
|
jashkenas |
Fixes #2197 -- uncached double existential
|
879fe39
|
|||
|
|
jashkenas |
Fixes #2287 -- tweak extends to make jshint easier
|
4606519
|
|
|
geraldalewis |
Wraps up #2211 -- addresses invocations within destructured params
|
f1b2864
|
|
|
michaelficarra |
lexer/parser: split out `null` and `undefined` from `BOOL` token
also made explicit AST nodes `Bool`, `Null`, and `Undefined` |
caf3da2
|
|||
|
|
michaelficarra |
reverting premature start of solution to #2306
|
848d105
|
|||
|
|
michaelficarra |
removing redundant cases in lexer; thanks @satyr
|
d5ddd0f
|
|
|
jashkenas |
adding a rel=canonical
|
fdcd99d
|
|
|
colinscape |
Fix typo in test name
|
fa899ab
|
|
|
michaelficarra |
Merge pull request #2299 from geraldalewis/2213-no-method-is-array
Wraps up #2211 -- addresses invocations within destructured params |
ed70540
|
|
|
michaelficarra |
small refactoring of 66c751b
|
dac24a3
|
|||
|
|
michaelficarra |
Fixes broken autocompletion from 8bc6001
8bc6001 removed autocompletions of non-enumerable own-properties in trying to add enumerable prototype properties to the autocompletions. This commit adds them back and unions them with the enumerable prototype properties. |
8dcbe54
|
|||
|
|
jashkenas |
Fixes #2331 -- bound 'super' regression
|
e3454ed
|
|||
|
|
jashkenas |
CoffeeScript 1.3.3
|
79492aa
|
- +1 −1 Cakefile
- +1 −1 documentation/coffee/block_comment.coffee
- +1 −1 documentation/docs/coffee-script.html
- +2 −1 documentation/docs/command.html
- +6 −4 documentation/docs/grammar.html
- +9 −9 documentation/docs/lexer.html
- +132 −108 documentation/docs/nodes.html
- +20 −10 documentation/docs/repl.html
- +9 −4 documentation/docs/rewriter.html
- +19 −15 documentation/docs/scope.html
- +47 −12 documentation/index.html.erb
- +1 −1 documentation/js/aliases.js
- +1 −1 documentation/js/array_comprehensions.js
- +2 −2 documentation/js/block_comment.js
- +1 −1 documentation/js/cake_tasks.js
- +2 −8 documentation/js/classes.js
- +1 −1 documentation/js/comparisons.js
- +1 −1 documentation/js/conditionals.js
- +1 −1 documentation/js/default_args.js
- +1 −1 documentation/js/do.js
- +1 −1 documentation/js/embedded.js
- +1 −1 documentation/js/existence.js
- +1 −1 documentation/js/expressions.js
- +1 −1 documentation/js/expressions_assignment.js
- +1 −1 documentation/js/expressions_comprehension.js
- +1 −1 documentation/js/expressions_try.js
- +1 −1 documentation/js/fat_arrow.js
- +1 −1 documentation/js/functions.js
- +1 −1 documentation/js/heredocs.js
- +1 −1 documentation/js/heregexes.js
- +1 −1 documentation/js/interpolation.js
- +1 −1 documentation/js/multiple_return_values.js
- +1 −1 documentation/js/object_comprehensions.js
- +1 −1 documentation/js/object_extraction.js
- +1 −1 documentation/js/objects_and_arrays.js
- +1 −1 documentation/js/objects_reserved.js
- +1 −1 documentation/js/overview.js
- +1 −1 documentation/js/parallel_assignment.js
- +1 −1 documentation/js/patterns_and_splats.js
- +1 −1 documentation/js/prototypes.js
- +1 −1 documentation/js/range_comprehensions.js
- +1 −1 documentation/js/scope.js
- +1 −1 documentation/js/slices.js
- +1 −1 documentation/js/soaks.js
- +1 −1 documentation/js/splats.js
- +1 −1 documentation/js/splices.js
- +1 −1 documentation/js/strings.js
- +1 −1 documentation/js/switch.js
- +1 −1 documentation/js/try.js
- +1 −1 documentation/js/while.js
- +2 −2 extras/coffee-script.js
- +52 −29 index.html
- +3 −2 lib/coffee-script/browser.js
- +1 −1 lib/coffee-script/cake.js
- +2 −2 lib/coffee-script/coffee-script.js
- +8 −10 lib/coffee-script/command.js
- +11 −8 lib/coffee-script/grammar.js
- +1 −1 lib/coffee-script/helpers.js
- +1 −1 lib/coffee-script/index.js
- +5 −9 lib/coffee-script/lexer.js
- +100 −86 lib/coffee-script/nodes.js
- +1 −3 lib/coffee-script/optparse.js
- +318 −227 lib/coffee-script/parser.js
- +31 −5 lib/coffee-script/repl.js
- +6 −6 lib/coffee-script/rewriter.js
- +13 −12 lib/coffee-script/scope.js
- +3 −2 package.json
- +1 −1 src/coffee-script.coffee
- +2 −1 src/command.coffee
- +6 −4 src/grammar.coffee
- +9 −9 src/lexer.coffee
- +51 −24 src/nodes.coffee
- +17 −3 src/repl.coffee
- +9 −4 src/rewriter.coffee
- +13 −6 src/scope.coffee
- +15 −0 test/assignment.coffee
- +8 −11 test/classes.coffee
- +18 −15 test/comprehensions.coffee
- +20 −0 test/functions.coffee
- +8 −0 test/objects.coffee
- +8 −1 test/operators.coffee
- +63 −0 test/scope.coffee
- +1 −1 test/soaks.coffee
- +26 −13 test/strict.coffee
| @@ -34,7 +34,7 @@ sources = [ | ||
| # Run a CoffeeScript through our node/coffee interpreter. | ||
| run = (args, cb) -> | ||
| - proc = spawn 'bin/coffee', args | ||
| + proc = spawn 'node', ['bin/coffee'].concat(args) | ||
| proc.stderr.on 'data', (buffer) -> console.log buffer.toString() | ||
| proc.on 'exit', (status) -> | ||
| process.exit(1) if status != 0 | ||
| @@ -1,5 +1,5 @@ | ||
| ### | ||
| -CoffeeScript Compiler v1.3.1 | ||
| +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">'utf8'</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">'.coffee'</span><span class="p">,</span> <span class="nf">(content) -></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">¶</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">'1.3.1'</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">¶</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">¶</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">'./helpers'</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">¶</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">'.coffee'</span><span class="p">,</span> <span class="nf">(content) -></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">¶</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">'1.3.3'</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">¶</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">¶</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">'./helpers'</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">¶</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 = {}) -></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> | ||
| @@ -77,9 +77,10 @@ | ||
| <span class="k">throw</span> <span class="nx">err</span> <span class="k">if</span> <span class="nx">err</span> <span class="o">and</span> <span class="nx">err</span><span class="p">.</span><span class="nx">code</span> <span class="o">isnt</span> <span class="s1">'ENOENT'</span> | ||
| <span class="k">return</span> <span class="k">if</span> <span class="nx">err</span><span class="o">?</span><span class="p">.</span><span class="nx">code</span> <span class="o">is</span> <span class="s1">'ENOENT'</span> | ||
| <span class="nv">index = </span><span class="nx">sources</span><span class="p">.</span><span class="nx">indexOf</span> <span class="nx">source</span> | ||
| + <span class="nv">files = </span><span class="nx">files</span><span class="p">.</span><span class="nx">filter</span> <span class="nf">(file) -></span> <span class="o">not</span> <span class="nx">hidden</span> <span class="nx">file</span> | ||
| <span class="nx">sources</span><span class="p">[</span><span class="nx">index</span><span class="p">..</span><span class="nx">index</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">source</span><span class="p">,</span> <span class="nx">file</span> <span class="k">for</span> <span class="nx">file</span> <span class="k">in</span> <span class="nx">files</span><span class="p">)</span> | ||
| <span class="nx">sourceCode</span><span class="p">[</span><span class="nx">index</span><span class="p">..</span><span class="nx">index</span><span class="p">]</span> <span class="o">=</span> <span class="nx">files</span><span class="p">.</span><span class="nx">map</span> <span class="o">-></span> <span class="kc">null</span> | ||
| - <span class="k">for</span> <span class="nx">file</span> <span class="k">in</span> <span class="nx">files</span> <span class="k">when</span> <span class="o">not</span> <span class="nx">hidden</span> <span class="nx">file</span> | ||
| + <span class="nx">files</span><span class="p">.</span><span class="nx">forEach</span> <span class="nf">(file) -></span> | ||
| <span class="nx">compilePath</span> <span class="p">(</span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">source</span><span class="p">,</span> <span class="nx">file</span><span class="p">),</span> <span class="kc">no</span><span class="p">,</span> <span class="nx">base</span> | ||
| <span class="k">else</span> <span class="k">if</span> <span class="nx">topLevel</span> <span class="o">or</span> <span class="nx">path</span><span class="p">.</span><span class="nx">extname</span><span class="p">(</span><span class="nx">source</span><span class="p">)</span> <span class="o">is</span> <span class="s1">'.coffee'</span> | ||
| <span class="nx">watch</span> <span class="nx">source</span><span class="p">,</span> <span class="nx">base</span> <span class="k">if</span> <span class="nx">opts</span><span class="p">.</span><span class="nx">watch</span> | ||
| @@ -83,10 +83,9 @@ | ||
| <span class="nx">o</span> <span class="s1">'JS'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Literal</span> <span class="nx">$1</span> | ||
| <span class="nx">o</span> <span class="s1">'REGEX'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Literal</span> <span class="nx">$1</span> | ||
| <span class="nx">o</span> <span class="s1">'DEBUGGER'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Literal</span> <span class="nx">$1</span> | ||
| - <span class="nx">o</span> <span class="s1">'BOOL'</span><span class="p">,</span> <span class="o">-></span> | ||
| - <span class="nv">val = </span><span class="k">new</span> <span class="nx">Literal</span> <span class="nx">$1</span> | ||
| - <span class="nv">val.isUndefined = </span><span class="kc">yes</span> <span class="k">if</span> <span class="nx">$1</span> <span class="o">is</span> <span class="s1">'undefined'</span> | ||
| - <span class="nx">val</span> | ||
| + <span class="nx">o</span> <span class="s1">'UNDEFINED'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Undefined</span> | ||
| + <span class="nx">o</span> <span class="s1">'NULL'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Null</span> | ||
| + <span class="nx">o</span> <span class="s1">'BOOL'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Bool</span> <span class="nx">$1</span> | ||
| <span class="p">]</span></pre></div> </td> </tr> <tr id="section-17"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-17">¶</a> </div> <p>Assignment of a variable, property, or index to a value.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">Assign: </span><span class="p">[</span> | ||
| <span class="nx">o</span> <span class="s1">'Assignable = Expression'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Assign</span> <span class="nx">$1</span><span class="p">,</span> <span class="nx">$3</span> | ||
| <span class="nx">o</span> <span class="s1">'Assignable = TERMINATOR Expression'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Assign</span> <span class="nx">$1</span><span class="p">,</span> <span class="nx">$4</span> | ||
| @@ -125,6 +124,8 @@ | ||
| <span class="nx">o</span> <span class="s1">''</span><span class="p">,</span> <span class="o">-></span> <span class="p">[]</span> | ||
| <span class="nx">o</span> <span class="s1">'Param'</span><span class="p">,</span> <span class="o">-></span> <span class="p">[</span><span class="nx">$1</span><span class="p">]</span> | ||
| <span class="nx">o</span> <span class="s1">'ParamList , Param'</span><span class="p">,</span> <span class="o">-></span> <span class="nx">$1</span><span class="p">.</span><span class="nx">concat</span> <span class="nx">$3</span> | ||
| + <span class="nx">o</span> <span class="s1">'ParamList OptComma TERMINATOR Param'</span><span class="p">,</span> <span class="o">-></span> <span class="nx">$1</span><span class="p">.</span><span class="nx">concat</span> <span class="nx">$4</span> | ||
| + <span class="nx">o</span> <span class="s1">'ParamList OptComma INDENT ParamList OptComma OUTDENT'</span><span class="p">,</span> <span class="o">-></span> <span class="nx">$1</span><span class="p">.</span><span class="nx">concat</span> <span class="nx">$4</span> | ||
| <span class="p">]</span></pre></div> </td> </tr> <tr id="section-25"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-25">¶</a> </div> <p>A single parameter in a function definition can be ordinary, or a splat | ||
| that hoovers up the remaining arguments.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">Param: </span><span class="p">[</span> | ||
| <span class="nx">o</span> <span class="s1">'ParamVar'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Param</span> <span class="nx">$1</span> | ||
| @@ -282,6 +283,7 @@ | ||
| <span class="p">]</span></pre></div> </td> </tr> <tr id="section-55"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-55">¶</a> </div> <p>An array of all accepted values for a variable inside the loop. | ||
| This enables support for pattern matching.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">ForValue: </span><span class="p">[</span> | ||
| <span class="nx">o</span> <span class="s1">'Identifier'</span> | ||
| + <span class="nx">o</span> <span class="s1">'ThisProperty'</span> | ||
| <span class="nx">o</span> <span class="s1">'Array'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Value</span> <span class="nx">$1</span> | ||
| <span class="nx">o</span> <span class="s1">'Object'</span><span class="p">,</span> <span class="o">-></span> <span class="k">new</span> <span class="nx">Value</span> <span class="nx">$1</span> | ||
| <span class="p">]</span></pre></div> </td> </tr> <tr id="section-56"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-56">¶</a> </div> <p>An array or range comprehension has variables for the current element | ||
Showing you all comments on commits in this comparison.
try
do ->
'use strict'
class Test
ok yes
catch error
ok noWe should probably revert the test also. |
|
Ah, of course. Thanks. edit: Unfortunately, that assignment doesn't throw a
But at least we'll catch the error if our classes ever cause a strict mode problem in a conforming interpreter. edit: 4043124 |
|
@jashkenas: This is another bug that may be affecting a good portion of our users. Even more reason now to get a bugfix release out. I say we figure out what we're going to do about #2213 and then push out a release ASAP. |
|
Ugh, this is so ugly. But... consistent. If we start seeing code like this in pull requests, I'm going to pull a _why and commit internet suicide. |
|
This looks like the old tests we were trying to avoid. I would have written
|
|
To be nitpicky, the
... or ...
|
|
That's okay, I've reverted this change in 848d105 |
|
This wasn't a DRY implementation. I should be making use of |
|
Looks like both edit: Removed by d5ddd0f. Thanks. |
|
Whoops: fixes #2328 |
|
Thanks, @davidchambers. I've refactored a little in dac24a3. |
|
This commit broke autocompletion of non-enumerable own-properties in the REPL. So it added enumerable prototype properties, but it doesn't show all the non-enumerable own-properties anymore. I just pushed a fix: 8dcbe54 |
|
@jashkenas: While on this topic, do you think we should also include non-enumerable prototype properties? I think it would be nice to have |
|
@michaelficarra +1; I think that would be very useful. Perhaps something like this? val = Object val
possibilities = []
loop
possibilities.push key for key in Object.getOwnPropertyNames(val) when key not in possibilities
break unless val = Object.getPrototypeOf(val)
completions = getCompletions prefix, possibilities |
|
|
|
I really wish there was a way for us to use this Node REPL logic, instead of repeating it ... but yes -- ideally we'd have the same basic features. |
|
There is. Just that it's fragile to future repl changes. |
|
@jashkenas: You should set either |
|
I think that
|