Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 4 commits
  • 13 files changed
  • 0 commit comments
  • 1 contributor
View
@@ -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
@@ -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">&#39;0.7.1&#39;</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">&#39;0.7.2&#39;</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">-&gt;</span>
<span class="nv">options: </span><span class="o">or</span> <span class="p">{}</span>
<span class="k">try</span>
@@ -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">&quot;unrecognized option: $arg&quot;</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>
@@ -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>
Oops, something went wrong.
View
@@ -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">-&gt;</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">-&gt;</span> square(x) <span class="Keyword">*</span> x
@@ -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
@@ -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
@@ -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"
@@ -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
@@ -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
@@ -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: ->
@@ -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'

No commit comments for this range