Comparing changes
Open a pull request
|
|
michaelficarra |
more changes to REPL autocompletion as suggested in 8dcbe54
|
c4ebe35
|
|||
|
|
michaelficarra |
corrected some SIGINT/EOT logic in REPL
|
5c66e55
|
|
|
heyLu |
fix repl completion and navigation
The readline interface of node has changed in [aad12d0][] and because of that the autocompletion and key movement didn't work anymore. This commit fixes this by checking whether stdin is in raw mode (i.e. invoked as a script) or not (as a repl). [aad12d0]: nodejs/node-v0.x-archive@aad12d0 |
01d4e87
|
|||
|
|
michaelficarra |
fixes #2349: inclusive slicing to numeric strings
|
b814981
|
|||
|
|
michaelficarra |
correct spacing around operators in slice output
|
972a529
|
|
|
jashkenas |
Merge pull request #2347 from heyLu/fix-repl
fix repl completion and navigation |
6838bae
|
|||
|
|
michaelficarra |
finally put #2333 to rest by resorting to using indirect eval
related: #1772, #1776; we're relying on the underlying engine having the string escaping behaviour we want instead of implementing it manually. |
81f780f
|
|||
|
|
michaelficarra |
typo in test case for #2333
|
6c6c8bd
|
|||
|
|
michaelficarra |
removing code that restricts duplicate key names and associated tests
|
7c29ea4
|
|
|
takkaw |
delete unused sentence
|
bc7e0cf
|
|
|
michaelficarra |
Merge pull request #2371 from takkaw/del_unused
dead code removal |
8d39c1c
|
|||
|
|
michaelficarra |
rebuild after merging #2371
|
1731f7d
|
|
|
michaelficarra |
removed duplicate "let" in RESERVED list
thanks @phleet for finding it: michaelficarra/CoffeeScriptRedux@161e9a6#commitcomment-1448952 |
6417cf4
|
|
|
Michael Smith |
Migrate from path.exists to fs.exists
Compatibility is kept for path.exists. Versions of node that have made the change will use fs.exists, while older versions will fall back to path.exists. The same goes for path.existsSync. |
No user is associated with the committer email.
|
ace4837
|
||
|
|
Michael Smith |
Correct incorrect line in blocks.coffee
|
No user is associated with the committer email.
|
2a56f0c
|
|
|
domenic |
Strip UTF-8 BOM when require'ing .coffee modules.
Allows people to author their .coffee files with UTF-8 BOMs at the start, because sometimes that happens. Fixes #798. |
c9388ce
|
|||
|
|
domenic |
Add test script to package.json.
Allows one to run the tests using `npm test`. |
81c0964
|
|||
|
|
jashkenas |
Merge pull request #2431 from domenic/npm-test
Add test script to package.json. |
219726a
|
|||
|
|
jashkenas |
Merge pull request #2430 from domenic/bom
Strip UTF-8 BOM when require'ing .coffee modules. |
1fa3da6
|
|
|
michaelficarra |
building #2430
|
a396837
|
|||
|
|
michaelficarra |
fixed broken compilation due to pull #2430
cc @jashkenas, @domenic, @yyfearth |
5d7a834
|
|
|
paulyoung |
Fixes #2441: Remove (deprecated) registerExtension support.
|
c29597b
|
|
|
jashkenas |
Merge pull request #2484 from paulyoung/remove-register-extension
Fixes #2441: Remove (deprecated) registerExtension support. |
b74e730
|
|
|
michaelficarra |
updated compiled output
|
ba34f8d
|
|||
|
|
michaelficarra |
fixes #2521: line numbers in errors affected by newlines in backticks
|
1b14c03
|
|
|
philikon |
Fix #2534: Don't pass a string argument to the XMLHttpRequest constru…
…ctor. |
ec59a62
|
|
|
philikon |
Fix #2534: Address @jashkenas review comment.
|
78423e9
|
|||
|
|
jashkenas |
Merge pull request #2535 from philikon/issue2534
Fix #2534: Don't pass a string argument to the XMLHttpRequest constructor |
2b86470
|
|
|
jashkenas |
Adding a CONTRIBUTING to CoffeeScript.
|
7595cb6
|
|
|
jashkenas |
rebuilding
|
97de09c
|
|
|
jashkenas |
Fixes #2577 -- better instructions for installing master
|
d8905e2
|
|
|
sstur |
Simplify Call.prototype.compileSplat based on how Traceur does it
|
25bdde8
|
|||
|
|
jashkenas |
Merge pull request #2587 from sstur/pullreq
Simplify Call.prototype.compileSplat based on how Traceur does it |
b06a326
|
|
|
jashkenas |
rebuilding nodes
|
7ad25c9
|
|||
|
|
jashkenas |
CoffeeScript 1.4.0
|
158d372
|
- +9 −0 CONTRIBUTING.md
- +1 −1 documentation/coffee/block_comment.coffee
- +17 −14 documentation/docs/browser.html
- +27 −25 documentation/docs/cake.html
- +37 −34 documentation/docs/coffee-script.html
- +98 −96 documentation/docs/command.html
- +7 −1 documentation/docs/docco.css
- +232 −232 documentation/docs/grammar.html
- +4 −2 documentation/docs/helpers.html
- +1 −1 documentation/docs/index.html
- +239 −240 documentation/docs/lexer.html
- +460 −472 documentation/docs/nodes.html
- +11 −11 documentation/docs/optparse.html
- +60 −56 documentation/docs/repl.html
- +78 −78 documentation/docs/rewriter.html
- +15 −15 documentation/docs/scope.html
- +33 −5 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
- +1 −1 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 examples/blocks.coffee
- +2 −2 extras/coffee-script.js
- +36 −8 index.html
- +2 −2 lib/coffee-script/browser.js
- +5 −3 lib/coffee-script/cake.js
- +12 −8 lib/coffee-script/coffee-script.js
- +8 −6 lib/coffee-script/command.js
- +1 −1 lib/coffee-script/grammar.js
- +13 −2 lib/coffee-script/helpers.js
- +1 −1 lib/coffee-script/index.js
- +5 −5 lib/coffee-script/lexer.js
- +10 −25 lib/coffee-script/nodes.js
- +1 −1 lib/coffee-script/optparse.js
- +34 −19 lib/coffee-script/repl.js
- +3 −3 lib/coffee-script/rewriter.js
- +1 −1 lib/coffee-script/scope.js
- +4 −1 package.json
- +4 −1 src/browser.coffee
- +3 −1 src/cake.coffee
- +5 −5 src/coffee-script.coffee
- +6 −4 src/command.coffee
- +5 −0 src/helpers.coffee
- +5 −6 src/lexer.coffee
- +4 −12 src/nodes.coffee
- +19 −15 src/repl.coffee
- +1 −1 test/importing.coffee
- +3 −0 test/slicing_and_splicing.coffee
- +0 −6 test/strict.coffee
| @@ -0,0 +1,9 @@ | ||
| +## How to contribute to CoffeeScript | ||
| + | ||
| +* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffee-script/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. | ||
| + | ||
| +* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffee-script/tree/master/test). | ||
| + | ||
| +* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffee-script/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide). | ||
| + | ||
| +* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release. |
| @@ -1,5 +1,5 @@ | ||
| ### | ||
| -CoffeeScript Compiler v1.3.3 | ||
| +CoffeeScript Compiler v1.4.0 | ||
| Released under the MIT License | ||
| ### | ||
| @@ -21,6 +21,12 @@ h1, h2, h3, h4, h5, h6 { | ||
| h1 { | ||
| margin-top: 40px; | ||
| } | ||
| +hr { | ||
| + border: 0 none; | ||
| + border-top: 1px solid #e5e5ee; | ||
| + height: 1px; | ||
| + margin: 20px 0; | ||
| +} | ||
| #container { | ||
| position: relative; | ||
| } | ||
| @@ -115,7 +121,7 @@ table td { | ||
| } | ||
| pre, tt, code { | ||
| font-size: 12px; line-height: 18px; | ||
| - font-family: Monaco, Consolas, "Lucida Console", monospace; | ||
| + font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; | ||
| margin: 0; padding: 0; | ||
| } | ||
| @@ -6,7 +6,7 @@ | ||
| <span class="nx">literal</span> <span class="o">is</span> <span class="nx">string</span><span class="p">.</span><span class="nx">substr</span> <span class="nx">string</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="nx">len</span> <span class="o">-</span> <span class="p">(</span><span class="nx">back</span> <span class="o">or</span> <span class="mi">0</span><span class="p">),</span> <span class="nx">len</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">¶</a> </div> <p>Trim out all falsy values from an array.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.compact = </span><span class="nf">(array) -></span> | ||
| <span class="nx">item</span> <span class="k">for</span> <span class="nx">item</span> <span class="k">in</span> <span class="nx">array</span> <span class="k">when</span> <span class="nx">item</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">¶</a> </div> <p>Count the number of occurrences of a string in a string.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.count = </span><span class="nf">(string, substr) -></span> | ||
| <span class="nv">num = pos = </span><span class="mi">0</span> | ||
| - <span class="k">return</span> <span class="mi">1</span><span class="o">/</span><span class="mi">0</span> <span class="nx">unless</span> <span class="nx">substr</span><span class="p">.</span><span class="nx">length</span> | ||
| + <span class="k">return</span> <span class="mi">1</span><span class="o">/</span><span class="mi">0</span> <span class="k">unless</span> <span class="nx">substr</span><span class="p">.</span><span class="nx">length</span> | ||
| <span class="nx">num</span><span class="o">++</span> <span class="k">while</span> <span class="nv">pos = </span><span class="mi">1</span> <span class="o">+</span> <span class="nx">string</span><span class="p">.</span><span class="nx">indexOf</span> <span class="nx">substr</span><span class="p">,</span> <span class="nx">pos</span> | ||
| <span class="nx">num</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">¶</a> </div> <p>Merge objects, returning a fresh copy with attributes from both sides. | ||
| Used every time <code>Base#compile</code> is called, to allow properties in the | ||
| @@ -26,6 +26,8 @@ | ||
| looking for a particular method in an options hash.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.del = </span><span class="nf">(obj, key) -></span> | ||
| <span class="nv">val = </span> <span class="nx">obj</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span> | ||
| <span class="k">delete</span> <span class="nx">obj</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span> | ||
| - <span class="nx">val</span></pre></div> </td> </tr> <tr id="section-10"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-10">¶</a> </div> <p>Gets the last item of an array(-like) object.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.last = </span><span class="nf">(array, back) -></span> <span class="nx">array</span><span class="p">[</span><span class="nx">array</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="p">(</span><span class="nx">back</span> <span class="o">or</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> | ||
| + <span class="nx">val</span></pre></div> </td> </tr> <tr id="section-10"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-10">¶</a> </div> <p>Gets the last item of an array(-like) object.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.last = </span><span class="nf">(array, back) -></span> <span class="nx">array</span><span class="p">[</span><span class="nx">array</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="p">(</span><span class="nx">back</span> <span class="o">or</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</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">¶</a> </div> <p>Typical Array::some</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.some = </span><span class="nb">Array</span><span class="o">::</span><span class="nx">some</span> <span class="o">?</span> <span class="nf">(fn) -></span> | ||
| + <span class="k">return</span> <span class="kc">true</span> <span class="k">for</span> <span class="nx">e</span> <span class="k">in</span> <span class="k">this</span> <span class="k">when</span> <span class="nx">fn</span> <span class="nx">e</span> | ||
| + <span class="kc">false</span> | ||
| </pre></div> </td> </tr> </tbody> </table> </div> </body> </html> | ||
| @@ -1,3 +1,3 @@ | ||
| -<!DOCTYPE html> <html> <head> <title>index.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To … <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="browser.html"> browser.coffee </a> <a class="source" href="cake.html"> cake.coffee </a> <a class="source" href="coffee-script.html"> coffee-script.coffee </a> <a class="source" href="command.html"> command.coffee </a> <a class="source" href="grammar.html"> grammar.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="lexer.html"> lexer.coffee </a> <a class="source" href="nodes.html"> nodes.coffee </a> <a class="source" href="optparse.html"> optparse.coffee </a> <a class="source" href="repl.html"> repl.coffee </a> <a class="source" href="rewriter.html"> rewriter.coffee </a> <a class="source" href="scope.html"> scope.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> index.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">¶</a> </div> <p>Loader for CoffeeScript as a Node.js library.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">exports</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span> <span class="o">=</span> <span class="nx">val</span> <span class="k">for</span> <span class="nx">key</span><span class="p">,</span> <span class="nx">val</span> <span class="k">of</span> <span class="nx">require</span> <span class="s1">'./coffee-script'</span> | ||
| +<!DOCTYPE html> <html> <head> <title>index.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To … <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="browser.html"> browser.coffee </a> <a class="source" href="cake.html"> cake.coffee </a> <a class="source" href="coffee-script.html"> coffee-script.coffee </a> <a class="source" href="command.html"> command.coffee </a> <a class="source" href="grammar.html"> grammar.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="lexer.html"> lexer.coffee </a> <a class="source" href="nodes.html"> nodes.coffee </a> <a class="source" href="optparse.html"> optparse.coffee </a> <a class="source" href="repl.html"> repl.coffee </a> <a class="source" href="rewriter.html"> rewriter.coffee </a> <a class="source" href="scope.html"> scope.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> index.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">¶</a> </div> <p>Loader for CoffeeScript as a Node.js library.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">exports</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span> <span class="o">=</span> <span class="nx">val</span> <span class="k">for</span> <span class="nx">key</span><span class="p">,</span> <span class="nx">val</span> <span class="k">of</span> <span class="nx">require</span> <span class="s">'./coffee-script'</span> | ||
| </pre></div> </td> </tr> </tbody> </table> </div> </body> </html> |
Showing you all comments on commits in this comparison.
|
Unfortunately, this is necessary. I noticed |
|
Nice test cases, but implementation seems a bit hairier than would be ideal -- especially with a variable named What you want to write is:
... or something along those lines. |
Revert away. |
|
|
Next:
|
|
What could have happened with this commit? There are changes to |
|
You must have missed 972a529. |
|
"normalize" is with a "z" ... and can we put all this on a branch for the time being, instead of having it on master? We shouldn't be doing backflips or indirect evals here. |
That's more of an opinion. I can change it, though, if you'd like.
Sure, but we do want to disallow duplicate keys in object initialisers, right? If so, why wouldn't this belong on |
|
Yep, let's follow American English style. We do want to disallow duplicate keys in object literals, but let's leave it on a pull request until we have an implementation we're comfortable with. |
|
See 81f780f#commitcomment-1356231 and #2352 |
Both L17 and L27 don't look right. |
|
Oh how embarrassing -_-. I am just not smart enough to do paren-less function calls, I think. Thanks for the save @michaelficarra. |