Permalink
...
Comparing changes
Open a pull request
- 4 commits
- 13 files changed
- 0 commit comments
- 1 contributor
Unified
Split
Showing
with
18 additions
and 20 deletions.
- +1 −1 Rakefile
- +1 −1 documentation/docs/coffee-script.html
- +1 −1 documentation/docs/optparse.html
- +3 −4 documentation/index.html.erb
- +2 −2 extras/coffee-script.js
- +3 −4 index.html
- +1 −1 lib/coffee-script.js
- +1 −1 lib/optparse.js
- +1 −1 package.json
- +1 −1 src/coffee-script.coffee
- +1 −1 src/optparse.coffee
- +1 −1 test/test_literals.coffee
- +1 −1 test/test_option_parser.coffee
View
2
Rakefile
| @@ -6,7 +6,7 @@ require 'yui/compressor' | ||
| HEADER = <<-EOS | ||
| /** | ||
| - * CoffeeScript Compiler v0.7.1 | ||
| + * CoffeeScript Compiler v0.7.2 | ||
| * http://coffeescript.org | ||
| * | ||
| * Copyright 2010, Jeremy Ashkenas | ||
View
2
documentation/docs/coffee-script.html
| @@ -16,7 +16,7 @@ | ||
| <span class="k">this</span><span class="p">.</span><span class="nv">exports: </span><span class="k">this</span><span class="p">.</span><span class="nv">CoffeeScript: </span><span class="p">{}</span> | ||
| <span class="nv">Lexer: </span> <span class="k">this</span><span class="p">.</span><span class="nx">Lexer</span> | ||
| <span class="nv">parser: </span> <span class="k">this</span><span class="p">.</span><span class="nx">parser</span> | ||
| - <span class="nv">helpers: </span> <span class="k">this</span><span class="p">.</span><span class="nx">helpers</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="octowrap"> <a class="octothorpe" 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">'0.7.1'</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="octowrap"> <a class="octothorpe" href="#section-4">#</a> </div> <p>Instantiate a Lexer for our use here.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">lexer: </span><span class="k">new</span> <span class="nx">Lexer</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="octowrap"> <a class="octothorpe" href="#section-5">#</a> </div> <p>Compile a string of CoffeeScript code to JavaScript, using the Coffee/Jison | ||
| + <span class="nv">helpers: </span> <span class="k">this</span><span class="p">.</span><span class="nx">helpers</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="octowrap"> <a class="octothorpe" 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">'0.7.2'</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="octowrap"> <a class="octothorpe" href="#section-4">#</a> </div> <p>Instantiate a Lexer for our use here.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">lexer: </span><span class="k">new</span> <span class="nx">Lexer</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="octowrap"> <a class="octothorpe" href="#section-5">#</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="p">(</span><span class="nx">code</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span> <span class="o">-></span> | ||
| <span class="nv">options: </span><span class="o">or</span> <span class="p">{}</span> | ||
| <span class="k">try</span> | ||
View
2
documentation/docs/optparse.html
| @@ -25,7 +25,7 @@ | ||
| <span class="nv">matchedRule: </span><span class="kc">no</span> | ||
| <span class="k">for</span> <span class="nx">rule</span> <span class="k">in</span> <span class="nx">@rules</span> | ||
| <span class="k">if</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">shortFlag</span> <span class="o">is</span> <span class="nx">arg</span> <span class="o">or</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">longFlag</span> <span class="o">is</span> <span class="nx">arg</span> | ||
| - <span class="nx">options</span><span class="p">[</span><span class="nx">rule</span><span class="p">.</span><span class="nx">name</span><span class="p">]</span><span class="o">:</span> <span class="k">if</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">hasArgument</span> <span class="k">then</span> <span class="nx">args</span><span class="p">[</span><span class="nx">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="k">else</span> <span class="kc">true</span> | ||
| + <span class="nx">options</span><span class="p">[</span><span class="nx">rule</span><span class="p">.</span><span class="nx">name</span><span class="p">]</span><span class="o">:</span> <span class="k">if</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">hasArgument</span> <span class="k">then</span> <span class="nx">args</span><span class="p">[</span><span class="nv">i: </span><span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="k">else</span> <span class="kc">true</span> | ||
| <span class="nv">matchedRule: </span><span class="kc">yes</span> | ||
| <span class="k">break</span> | ||
| <span class="k">throw</span> <span class="k">new</span> <span class="nb">Error</span> <span class="s2">"unrecognized option: $arg"</span> <span class="k">if</span> <span class="nx">isOption</span> <span class="o">and</span> <span class="o">not</span> <span class="nx">matchedRule</span> | ||
View
7
documentation/index.html.erb
| @@ -129,7 +129,7 @@ alert reverse '.eeffoC yrT'</textarea></div> | ||
| <p> | ||
| <b>Latest Version:</b> | ||
| - <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.1">0.7.1</a> | ||
| + <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.2">0.7.2</a> | ||
| </p> | ||
| <h2> | ||
| @@ -175,7 +175,7 @@ alert reverse '.eeffoC yrT'</textarea></div> | ||
| Then clone the CoffeeScript | ||
| <a href="http://github.com/jashkenas/coffee-script">source repository</a> | ||
| from GitHub, or download the latest | ||
| - release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.1">0.7.1</a>. | ||
| + release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.2">0.7.2</a>. | ||
| To install the CoffeeScript compiler system-wide | ||
| under <tt>/usr/local</tt>, open the directory and run: | ||
| </p> | ||
| @@ -354,8 +354,7 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre> | ||
| <span id="functions" class="bookmark"></span> | ||
| <b class="header">Functions and Invocation</b> | ||
| Functions are defined by a list of parameters, an arrow, and the | ||
| - function body. The empty function looks like this: <tt>-></tt> All | ||
| - functions in CoffeeScript are named by default, for easier debugging. | ||
| + function body. The empty function looks like this: <tt>-></tt> | ||
| </p> | ||
| <%= code_for('functions', 'cube(5)') %> | ||
| <p> | ||
View
7
index.html
| @@ -115,7 +115,7 @@ | ||
| <p> | ||
| <b>Latest Version:</b> | ||
| - <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.1">0.7.1</a> | ||
| + <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.2">0.7.2</a> | ||
| </p> | ||
| <h2> | ||
| @@ -260,7 +260,7 @@ | ||
| Then clone the CoffeeScript | ||
| <a href="http://github.com/jashkenas/coffee-script">source repository</a> | ||
| from GitHub, or download the latest | ||
| - release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.1">0.7.1</a>. | ||
| + release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.7.2">0.7.2</a>. | ||
| To install the CoffeeScript compiler system-wide | ||
| under <tt>/usr/local</tt>, open the directory and run: | ||
| </p> | ||
| @@ -439,8 +439,7 @@ | ||
| <span id="functions" class="bookmark"></span> | ||
| <b class="header">Functions and Invocation</b> | ||
| Functions are defined by a list of parameters, an arrow, and the | ||
| - function body. The empty function looks like this: <tt>-></tt> All | ||
| - functions in CoffeeScript are named by default, for easier debugging. | ||
| + function body. The empty function looks like this: <tt>-></tt> | ||
| </p> | ||
| <div class='code'><pre class="idle"><span class="FunctionName">square</span><span class="Keyword">:</span> <span class="FunctionArgument">(</span><span class="FunctionArgument">x</span><span class="FunctionArgument">)</span> <span class="Storage">-></span> x <span class="Keyword">*</span> x | ||
| <span class="FunctionName">cube</span><span class="Keyword">:</span> <span class="FunctionArgument">(</span><span class="FunctionArgument">x</span><span class="FunctionArgument">)</span> <span class="Storage">-></span> square(x) <span class="Keyword">*</span> x | ||
View
2
lib/coffee-script.js
| @@ -15,7 +15,7 @@ | ||
| parser = this.parser; | ||
| helpers = this.helpers; | ||
| } | ||
| - exports.VERSION = '0.7.1'; | ||
| + exports.VERSION = '0.7.2'; | ||
| lexer = new Lexer(); | ||
| exports.compile = (compile = function(code, options) { | ||
| options = options || {}; | ||
View
2
lib/optparse.js
| @@ -21,7 +21,7 @@ | ||
| for (_c = 0, _e = _d.length; _c < _e; _c++) { | ||
| rule = _d[_c]; | ||
| if (rule.shortFlag === arg || rule.longFlag === arg) { | ||
| - options[rule.name] = rule.hasArgument ? args[i + 1] : true; | ||
| + options[rule.name] = rule.hasArgument ? args[i += 1] : true; | ||
| matchedRule = true; | ||
| break; | ||
| } | ||
View
2
package.json
| @@ -3,7 +3,7 @@ | ||
| "description": "Unfancy JavaScript", | ||
| "keywords": ["javascript", "language"], | ||
| "author": "Jeremy Ashkenas", | ||
| - "version": "0.7.1", | ||
| + "version": "0.7.2", | ||
| "licenses": [{ | ||
| "type": "MIT", | ||
| "url": "http://github.com/jashkenas/coffee-script/raw/master/LICENSE" | ||
View
2
src/coffee-script.coffee
| @@ -22,7 +22,7 @@ else | ||
| helpers: this.helpers | ||
| # The current CoffeeScript version number. | ||
| -exports.VERSION: '0.7.1' | ||
| +exports.VERSION: '0.7.2' | ||
| # Instantiate a Lexer for our use here. | ||
| lexer: new Lexer | ||
View
2
src/optparse.coffee
| @@ -30,7 +30,7 @@ exports.OptionParser: class OptionParser | ||
| matchedRule: no | ||
| for rule in @rules | ||
| if rule.shortFlag is arg or rule.longFlag is arg | ||
| - options[rule.name]: if rule.hasArgument then args[i + 1] else true | ||
| + options[rule.name]: if rule.hasArgument then args[i: + 1] else true | ||
| matchedRule: yes | ||
| break | ||
| throw new Error "unrecognized option: $arg" if isOption and not matchedRule | ||
View
2
test/test_literals.coffee
| @@ -26,7 +26,7 @@ ok [0...10].join(' ') is '0 1 2 3 4 5 6 7 8 9' | ||
| # Can call methods directly on numbers. | ||
| -4.toFixed(10) is '4.0000000000' | ||
| +4.valueOf() is 4 | ||
| func: -> | ||
View
2
test/test_option_parser.coffee
| @@ -16,5 +16,5 @@ result: opt.parse ['--optional', '-r', 'folder', 'one', 'two'] | ||
| ok result.optional is true | ||
| ok result.required is 'folder' | ||
| -ok result.arguments.join(' ') is 'folder one two' | ||
| +ok result.arguments.join(' ') is 'one two' | ||