Compare commits

...

62 Commits
1.9.1 ... 1.9.3

Author SHA1 Message Date
Jeremy Ashkenas
c37f284771 redoc 2015-05-27 11:57:31 -04:00
Jeremy Ashkenas
585298dc17 Merge pull request #3980 from lydell/v1.9.3
CoffeeScript 1.9.3
2015-05-27 11:51:32 -04:00
Simon Lydell
b58772e8a7 CoffeeScript 1.9.3 2015-05-14 11:24:39 +02:00
Michael Ficarra
769f02ec05 Merge pull request #3979 from lydell/herecomments-formatting
Fix formatting of `#`-only lines in herecomments
2015-05-13 09:02:34 -07:00
Simon Lydell
52b1749d57 Fix formatting of #-only lines in herecomments
Before:

    $ ./bin/coffee -bpe '###
    > # paragraph 1
    > #
    > # paragraph 2
    > ###'
    /*
     * paragraph 1
    #
     * paragraph 2
     */

After:

    $ ./bin/coffee -bpe '###
    # paragraph 1
    #
    # paragraph 2
    ###'
    /*
     * paragraph 1
     *
     * paragraph 2
     */

This does not re-break #3638:

    $ ./bin/coffee -bpe '###
    > #/
    > ###'
    /*
    #/
     */
2015-05-13 17:50:09 +02:00
Simon Lydell
ba85a38cb0 Commit compiled code that should have been in commit 378a04e4 2015-05-13 17:50:02 +02:00
Michael Ficarra
c0d44b1abd Merge pull request #3966 from davidbau/simplesourcemaps
Fix #3965, sourcemaps for bare programs.
2015-05-08 07:52:58 -07:00
Michael Ficarra
0262322400 Merge pull request #3974 from carlsmith/issue3958
Improved try/catch/finally to explain the options better.
2015-05-02 09:06:49 -07:00
Carl Smith
8e8f6d13bd Improved try/catch/finally to explain the options better. 2015-05-01 22:38:25 +01:00
Michael Ficarra
b6667f0735 Merge pull request #3970 from lydell/docs
Document a few undocumented things
2015-05-01 08:12:53 -07:00
Simon Lydell
99ea1c7a39 Document a for [b..c] 2015-05-01 17:01:05 +02:00
Simon Lydell
27fd65390a Document yield from and yield return
Fixes #3825.
2015-05-01 17:01:05 +02:00
Simon Lydell
79a6d89849 Document interpolation in object keys
Fixes #3962.
2015-05-01 17:01:05 +02:00
Simon Lydell
6fb5833843 Improve modulo documentation
Fixes #3959.
2015-05-01 17:00:58 +02:00
Simon Lydell
5494ac13ee Document extra try/catch features
Fixes #3958.
2015-05-01 16:59:34 +02:00
Michael Ficarra
300faf401c Merge pull request #3968 from lydell/nodes-tokens-errors
Fix `CoffeeScript.nodes(tokens)`; fix the repl
2015-05-01 07:51:17 -07:00
Michael Ficarra
f2c6066103 Merge pull request #3967 from lydell/implicit-call-implicit-obj
Fix #3935: Implicit calls + obj key interpolation
2015-05-01 07:48:59 -07:00
Michael Ficarra
2a5320fd2b Merge pull request #3969 from lydell/alias-origin
Save alias names in the origin of tokens
2015-05-01 07:41:14 -07:00
Simon Lydell
36695540fc Save alias names in the origin of tokens
... and use it for "reserved word can't be assigned" errors. Fixes #2306.
2015-05-01 14:33:11 +02:00
Simon Lydell
fc0c4fdd5f Fix CoffeeScript.nodes(tokens); fix the repl
If you passed an array of tokens (as opposed to a string of code) to
`CoffeeScript.nodes`, its attempts to prettify error messages would break. Now
it does not attempt to prettify error messages in that case anymore (because it
is not possible to prettify the errors without a string of code).

The repl was affected by the above bug.

Fixes #3887.
2015-05-01 13:43:04 +02:00
Simon Lydell
ebc172d1ee Fix #3935: Implicit calls + obj key interpolation
Allow implicit calls when the first key of an implicit object has interpolation.
2015-05-01 12:02:03 +02:00
Simon Lydell
4e6b6678f7 Add tests for implicit calls with implicit object 2015-05-01 11:53:37 +02:00
David Bau
378a04e48c Fix #3965, sourcemaps for bare programs.
Instead of mapping all generated spaces and semicolons and newlines
to the source position (0,0), we avoid generating sourcemap information
for generated space-or-semicolon-only fragments.

(In addition to shortening sourcemaps, this fixes a correctness issue
where an empty fragment at the beginning of each line maps from (0,0),
but in a bare program, that position at the begining of the line
should map from the actual source line.  When this conflict occurred,
(0,0) would win, resulting in an incorrect sourcemap, where each
top-level function call mapped to (0,0).)
2015-04-30 22:08:26 -04:00
Michael Ficarra
1e62781759 Merge pull request #3953 from sixmen/fix_repl_fd_leak
fix history file descriptor leak
2015-04-23 06:46:50 -07:00
Michael Ficarra
234adef20c Merge pull request #3952 from sixmen/fix_write_after_fin
fix write after FIN error when using repl via socket
2015-04-23 06:45:04 -07:00
Sangmin Yoon
8b463cd3ad fix history file descriptor leak 2015-04-22 15:26:44 +09:00
Sangmin Yoon
ce10a463f3 fix write after FIN error when using repl via socket
if repl.outputStream is a socket, it is closed when 'exit' event
occurred, so write throws an exception
2015-04-22 15:11:56 +09:00
Jeremy Ashkenas
140a73dca7 adding new packt book at their request 2015-04-15 12:03:22 -04:00
Jeremy Ashkenas
46d16b5c49 #3942 -- revising changelog 2015-04-15 11:49:14 -04:00
Jeremy Ashkenas
d16cf19c15 Merge pull request #3942 from alubbe/master
1.9.2
2015-04-15 11:44:48 -04:00
Andreas Lubbe
edbb9a77e7 build & docs for 1.9.2 2015-04-15 17:26:30 +02:00
Andreas Lubbe
cc4c3b2606 added 1.9.2 changelog 2015-04-15 17:26:06 +02:00
Andreas Lubbe
3a2888f97a bumped version to 1.9.2 2015-04-15 17:25:49 +02:00
Jeremy Ashkenas
bd17cc9b3c Merge pull request #3892 from matthieubulte/master
Added checking on process.stdout to be compatible with browserify
2015-03-09 09:42:27 -04:00
Jeremy Ashkenas
0a3e3639dc Merge pull request #3706 from imcotton/script-data-src
Optionally to read data-src out from <script>
2015-03-09 09:41:32 -04:00
Cotton Hou
008bacf5d5 add compiled lib/browser.js 2015-03-09 15:59:10 +08:00
Cotton Hou
cc1b056b03 optionally to read data-src out from <script> 2015-03-09 15:37:09 +08:00
Matthieu Bulté
3548b4883e Added checking on process.stdout to be compatible with browserify 2015-03-09 08:30:01 +01:00
Michael Ficarra
37a376497c Merge pull request #3893 from josh/escape-literal-bracket-regexp
Escape literal ] in regexp
2015-03-08 22:18:16 -07:00
Joshua Peek
83744917b0 Escape literal ] in REGEX
] is not allowed in the PatternCharacter set
2015-03-08 21:59:09 -07:00
Jeremy Ashkenas
a548b70e8c Merge pull request #3661 from dtaniwaki/fix-deprecated-option
Use stdio option instead of customFds
2015-03-06 09:58:33 -05:00
Jeremy Ashkenas
c8147c046a Reverts #3758, Fixes #3863 -- kills the broken warning 2015-03-03 14:30:52 -05:00
Jeremy Ashkenas
4a7497b451 Merge pull request #3886 from jashkenas/revert-3885-escape-literal-bracket-regexp
Revert "Escape literal [ in regexp"
2015-02-26 16:05:25 -05:00
Jeremy Ashkenas
06aa329596 Revert "Escape literal [ in regexp" 2015-02-26 16:05:12 -05:00
Jeremy Ashkenas
9becb0e937 Merge pull request #3885 from josh/escape-literal-bracket-regexp
Escape literal [ in regexp
2015-02-26 14:49:24 -05:00
Joshua Peek
7f7765546f Escape literal [ in regexp
Improves compatibility with strict ES5 regexp syntax
2015-02-26 12:37:27 -06:00
Jeremy Ashkenas
c7a365b6f1 Merge pull request #3883 from alubbe/master
yield now behaves as expected around 'this'
2015-02-26 11:41:42 -05:00
Andreas Lubbe
84c125a71b yield now behaves as expected around 'this' - fixes https://github.com/jashkenas/coffeescript/issues/3882 2015-02-26 13:01:12 +01:00
Jeremy Ashkenas
06b74591e7 Merge pull request #3877 from gilesbowkett/ocd-test-description-details
added descriptions to tests which only had Issue numbers
2015-02-23 23:18:22 -05:00
Giles Bowkett
6645fbb895 added descriptions to tests which only had Issue numbers 2015-02-23 16:39:05 -07:00
Jeremy Ashkenas
c2758da9eb Merge pull request #3873 from Taritsyn/master
Fix getting of character at index
2015-02-23 10:36:47 -05:00
Jeremy Ashkenas
7a1c8fef0a Merge pull request #3872 from banyan/add-link-of-changelog
Update README.md and remove README
2015-02-23 10:36:01 -05:00
Andrey Taritsyn
71c59dddcc Fix getting of character at index 2015-02-22 19:08:15 +03:00
Kohei Hasegawa
ef6f90753a Delete README 2015-02-21 14:12:19 -05:00
Kohei Hasegawa
50fff63252 Add link of changelog 2015-02-21 13:59:35 -05:00
Jeremy Ashkenas
8f5c77c3ce Merge pull request #3871 from jcrben/doc_tweak
Replace references to jQuery's 'bind' with 'on'
2015-02-20 17:16:32 -05:00
Ben Creasy
88529bc339 Replace references to jQuery's 'bind' with 'on' 2015-02-20 14:02:47 -08:00
Jeremy Ashkenas
f37f9d1eda Merge pull request #3867 from sgentle/require-option
add -r/--require command line option
2015-02-19 14:06:51 -05:00
Sam Gentle
836175baab add -r/--require command line option 2015-02-20 02:58:10 +11:00
Jeremy Ashkenas
7395ac1d4f variable names 2015-02-18 15:48:45 -05:00
Jeremy Ashkenas
61988fe361 #3862 changelog 2015-02-18 15:46:14 -05:00
dtaniwaki
1301390087 Use stdio option instead of customFds 2014-10-04 12:54:07 +09:00
139 changed files with 1222 additions and 322 deletions

50
README
View File

@@ -1,50 +0,0 @@
{
} } {
{ { } }
} }{ {
{ }{ } } _____ __ __
{ }{ }{ { } / ____| / _|/ _|
.- { { } { }} -. | | ___ | |_| |_ ___ ___
( { } { } { } } ) | | / _ \| _| _/ _ \/ _ \
|`-..________ ..-'| | |___| (_) | | | || __/ __/
| | \_____\___/|_| |_| \___|\___|
| ;--.
| (__ \ _____ _ _
| | ) ) / ____| (_) | |
| |/ / | (___ ___ _ __ _ _ __ | |_
| ( / \___ \ / __| '__| | '_ \| __|
| |/ ____) | (__| | | | |_) | |_
| | |_____/ \___|_| |_| .__/ \__|
`-.._________..-' | |
|_|
CoffeeScript is a little language that compiles into JavaScript.
If you have the Node Package Manager installed:
npm install -g coffee-script
(Leave off the -g if you don't wish to install globally.)
Or, if you don't wish to use npm:
sudo bin/cake install
Execute a script:
coffee /path/to/script.coffee
Compile a script:
coffee -c /path/to/script.coffee
For documentation, usage, and examples, see:
http://coffeescript.org/
To suggest a feature, report a bug, or general discussion:
http://github.com/jashkenas/coffeescript/issues/
If you'd like to chat, drop by #coffeescript on Freenode IRC,
or on webchat.freenode.net.
The source repository:
git://github.com/jashkenas/coffeescript.git
Top 100 contributors are listed here:
http://github.com/jashkenas/coffeescript/contributors

View File

@@ -57,4 +57,6 @@ If you'd like to chat, drop by #coffeescript on Freenode IRC.
The source repository: https://github.com/jashkenas/coffeescript.git
Changelog: http://coffeescript.org/#changelog
Our lovely and talented contributors are listed here: http://github.com/jashkenas/coffeescript/contributors

View File

@@ -1,6 +1,6 @@
{
"name": "coffee-script",
"version": "1.9.1",
"version": "1.9.3",
"main": [
"lib/coffee-script/coffee-script.js"
],

View File

@@ -0,0 +1,24 @@
// Generated by CoffeeScript 1.9.3
var volume, winner;
if (ignition === true) {
launch();
}
if (band !== SpinalTap) {
volume = 10;
}
if (answer !== false) {
letTheWildRumpusBegin();
}
if (car.speed < limit) {
accelerate();
}
if (pick === 47 || pick === 92 || pick === 13) {
winner = true;
}
print(inspect("My name is " + this.name));

View File

@@ -0,0 +1,24 @@
// Generated by CoffeeScript 1.9.3
var courses, dish, food, foods, i, j, k, l, len, len1, len2, ref;
ref = ['toast', 'cheese', 'wine'];
for (j = 0, len = ref.length; j < len; j++) {
food = ref[j];
eat(food);
}
courses = ['greens', 'caviar', 'truffles', 'roast', 'cake'];
for (i = k = 0, len1 = courses.length; k < len1; i = ++k) {
dish = courses[i];
menu(i + 1, dish);
}
foods = ['broccoli', 'spinach', 'chocolate'];
for (l = 0, len2 = foods.length; l < len2; l++) {
food = foods[l];
if (food !== 'chocolate') {
eat(food);
}
}

View File

@@ -0,0 +1,7 @@
// Generated by CoffeeScript 1.9.3
/*
SkinnyMochaHalfCaffScript Compiler v1.0
Released under the MIT License
*/

View File

@@ -0,0 +1,14 @@
// Generated by CoffeeScript 1.9.3
var fs;
fs = require('fs');
option('-o', '--output [DIR]', 'directory for compiled code');
task('build:parser', 'rebuild the Jison parser', function(options) {
var code, dir;
require('jison');
code = require('./lib/grammar').parser.generate();
dir = options.output || 'lib';
return fs.writeFile(dir + "/parser.js", code);
});

View File

@@ -0,0 +1,4 @@
// Generated by CoffeeScript 1.9.3
$('body').click(function(e) {
return $('.box').fadeIn('fast').addClass('.active');
}).css('background', 'white');

View File

@@ -0,0 +1,57 @@
// Generated by CoffeeScript 1.9.3
var Animal, Horse, Snake, sam, tom,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
Animal = (function() {
function Animal(name) {
this.name = name;
}
Animal.prototype.move = function(meters) {
return alert(this.name + (" moved " + meters + "m."));
};
return Animal;
})();
Snake = (function(superClass) {
extend(Snake, superClass);
function Snake() {
return Snake.__super__.constructor.apply(this, arguments);
}
Snake.prototype.move = function() {
alert("Slithering...");
return Snake.__super__.move.call(this, 5);
};
return Snake;
})(Animal);
Horse = (function(superClass) {
extend(Horse, superClass);
function Horse() {
return Horse.__super__.constructor.apply(this, arguments);
}
Horse.prototype.move = function() {
alert("Galloping...");
return Horse.__super__.move.call(this, 45);
};
return Horse;
})(Animal);
sam = new Snake("Sammy the Python");
tom = new Horse("Tommy the Palomino");
sam.move();
tom.move();

View File

@@ -0,0 +1,6 @@
// Generated by CoffeeScript 1.9.3
var cholesterol, healthy;
cholesterol = 127;
healthy = (200 > cholesterol && cholesterol > 60);

View File

@@ -0,0 +1,15 @@
// Generated by CoffeeScript 1.9.3
var date, mood;
if (singing) {
mood = greatlyImproved;
}
if (happy && knowsIt) {
clapsHands();
chaChaCha();
} else {
showIt();
}
date = friday ? sue : jill;

View File

@@ -0,0 +1,15 @@
// Generated by CoffeeScript 1.9.3
var Person, tim;
Person = (function() {
function Person(options) {
this.name = options.name, this.age = options.age, this.height = options.height;
}
return Person;
})();
tim = new Person({
age: 4
});

View File

@@ -0,0 +1,9 @@
// Generated by CoffeeScript 1.9.3
var fill;
fill = function(container, liquid) {
if (liquid == null) {
liquid = "coffee";
}
return "Filling the " + container + " with " + liquid + "...";
};

View File

@@ -0,0 +1,12 @@
// Generated by CoffeeScript 1.9.3
var filename, fn, i, len;
fn = function(filename) {
return fs.readFile(filename, function(err, contents) {
return compile(filename, contents.toString());
});
};
for (i = 0, len = list.length; i < len; i++) {
filename = list[i];
fn(filename);
}

View File

@@ -0,0 +1,6 @@
// Generated by CoffeeScript 1.9.3
var hi;
hi = function() {
return [document.title, "Hello JavaScript"].join(": ");
};

View File

@@ -0,0 +1,14 @@
// Generated by CoffeeScript 1.9.3
var footprints, solipsism, speed;
if ((typeof mind !== "undefined" && mind !== null) && (typeof world === "undefined" || world === null)) {
solipsism = true;
}
speed = 0;
if (speed == null) {
speed = 15;
}
footprints = typeof yeti !== "undefined" && yeti !== null ? yeti : "bear";

View File

@@ -0,0 +1,6 @@
// Generated by CoffeeScript 1.9.3
var first, last, ref, text;
text = "Every literary critic believes he will outwit history and have the last word";
ref = text.split(" "), first = ref[0], last = ref[ref.length - 1];

View File

@@ -0,0 +1,18 @@
// Generated by CoffeeScript 1.9.3
var eldest, grade;
grade = function(student) {
if (student.excellentWork) {
return "A+";
} else if (student.okayStuff) {
if (student.triedHard) {
return "B";
} else {
return "B-";
}
} else {
return "C";
}
};
eldest = 24 > 21 ? "Liz" : "Ike";

View File

@@ -0,0 +1,4 @@
// Generated by CoffeeScript 1.9.3
var one, six, three, two;
six = (one = 1) + (two = 2) + (three = 3);

View File

@@ -0,0 +1,11 @@
// Generated by CoffeeScript 1.9.3
var globals, name;
globals = ((function() {
var results;
results = [];
for (name in window) {
results.push(name);
}
return results;
})()).slice(0, 10);

View File

@@ -0,0 +1,11 @@
// Generated by CoffeeScript 1.9.3
var error;
alert((function() {
try {
return nonexistent / void 0;
} catch (_error) {
error = _error;
return "And the error is ... " + error;
}
})());

View File

@@ -2,5 +2,5 @@ Account = (customer, cart) ->
@customer = customer
@cart = cart
$('.shopping_cart').bind 'click', (event) =>
$('.shopping_cart').on 'click', (event) =>
@customer.purchase @cart

View File

@@ -0,0 +1,12 @@
// Generated by CoffeeScript 1.9.3
var Account;
Account = function(customer, cart) {
this.customer = customer;
this.cart = cart;
return $('.shopping_cart').on('click', (function(_this) {
return function(event) {
return _this.customer.purchase(_this.cart);
};
})(this));
};

View File

@@ -0,0 +1,10 @@
// Generated by CoffeeScript 1.9.3
var cube, square;
square = function(x) {
return x * x;
};
cube = function(x) {
return square(x) * x;
};

View File

@@ -0,0 +1,13 @@
// Generated by CoffeeScript 1.9.3
var perfectSquares;
perfectSquares = function*() {
var num;
num = 0;
while (true) {
num += 1;
(yield num * num);
}
};
window.ps || (window.ps = perfectSquares());

View File

@@ -0,0 +1,4 @@
// Generated by CoffeeScript 1.9.3
var html;
html = "<strong>\n cup of coffeescript\n</strong>";

View File

@@ -0,0 +1,4 @@
// Generated by CoffeeScript 1.9.3
var OPERATOR;
OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/;

View File

@@ -6,4 +6,3 @@ sentence = "#{ 22 / 7 } is a decent approximation of π"

View File

@@ -0,0 +1,8 @@
// Generated by CoffeeScript 1.9.3
var author, quote, sentence;
author = "Wittgenstein";
quote = "A picture is a fact. -- " + author;
sentence = (22 / 7) + " is a decent approximation of π";

View File

@@ -0,0 +1,4 @@
-7 % 5 == -2 # The remainder of 7 / 5
-7 %% 5 == 3 # n %% 5 is always between 0 and 4
tabs.selectTabAtIndex((tabs.currentIndex - count) %% tabs.length)

View File

@@ -0,0 +1,8 @@
// Generated by CoffeeScript 1.9.3
var modulo = function(a, b) { return (+a % (b = +b) + b) % b; };
-7 % 5 === -2;
modulo(-7, 5) === 3;
tabs.selectTabAtIndex(modulo(tabs.currentIndex - count, tabs.length));

View File

@@ -0,0 +1,8 @@
// Generated by CoffeeScript 1.9.3
var city, forecast, ref, temp, weatherReport;
weatherReport = function(location) {
return [location, 72, "Mostly Sunny"];
};
ref = weatherReport("Berkeley, CA"), city = ref[0], temp = ref[1], forecast = ref[2];

View File

@@ -0,0 +1,18 @@
// Generated by CoffeeScript 1.9.3
var age, ages, child, yearsOld;
yearsOld = {
max: 10,
ida: 9,
tim: 11
};
ages = (function() {
var results;
results = [];
for (child in yearsOld) {
age = yearsOld[child];
results.push(child + " is " + age);
}
return results;
})();

View File

@@ -0,0 +1,13 @@
// Generated by CoffeeScript 1.9.3
var city, futurists, name, ref, ref1, street;
futurists = {
sculptor: "Umberto Boccioni",
painter: "Vladimir Burliuk",
poet: {
name: "F.T. Marinetti",
address: ["Via Roma 42R", "Bellagio, Italy 22021"]
}
};
ref = futurists.poet, name = ref.name, (ref1 = ref.address, street = ref1[0], city = ref1[1]);

View File

@@ -0,0 +1,22 @@
// Generated by CoffeeScript 1.9.3
var bitlist, kids, singers, song;
song = ["do", "re", "mi", "fa", "so"];
singers = {
Jagger: "Rock",
Elvis: "Roll"
};
bitlist = [1, 0, 1, 0, 0, 1, 1, 1, 0];
kids = {
brother: {
name: "Max",
age: 11
},
sister: {
name: "Ida",
age: 9
}
};

View File

@@ -0,0 +1,6 @@
// Generated by CoffeeScript 1.9.3
$('.account').attr({
"class": 'active'
});
log(object["class"]);

View File

@@ -0,0 +1,45 @@
// Generated by CoffeeScript 1.9.3
var cubes, list, math, num, number, opposite, race, square,
slice = [].slice;
number = 42;
opposite = true;
if (opposite) {
number = -42;
}
square = function(x) {
return x * x;
};
list = [1, 2, 3, 4, 5];
math = {
root: Math.sqrt,
square: square,
cube: function(x) {
return x * square(x);
}
};
race = function() {
var runners, winner;
winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];
return print(winner, runners);
};
if (typeof elvis !== "undefined" && elvis !== null) {
alert("I knew it!");
}
cubes = (function() {
var i, len, results;
results = [];
for (i = 0, len = list.length; i < len; i++) {
num = list[i];
results.push(math.cube(num));
}
return results;
})();

View File

@@ -0,0 +1,8 @@
// Generated by CoffeeScript 1.9.3
var ref, theBait, theSwitch;
theBait = 1000;
theSwitch = 0;
ref = [theSwitch, theBait], theBait = ref[0], theSwitch = ref[1];

View File

@@ -0,0 +1,7 @@
// Generated by CoffeeScript 1.9.3
var close, contents, i, open, ref, tag,
slice = [].slice;
tag = "<impossible>";
ref = tag.split(""), open = ref[0], contents = 3 <= ref.length ? slice.call(ref, 1, i = ref.length - 1) : (i = 1, []), close = ref[i++];

4
documentation/coffee/prototypes.js vendored Normal file
View File

@@ -0,0 +1,4 @@
// Generated by CoffeeScript 1.9.3
String.prototype.dasherize = function() {
return this.replace(/_/g, "-");
};

View File

@@ -0,0 +1,11 @@
// Generated by CoffeeScript 1.9.3
var countdown, num;
countdown = (function() {
var i, results;
results = [];
for (num = i = 10; i >= 1; num = --i) {
results.push(num);
}
return results;
})();

View File

@@ -0,0 +1,12 @@
// Generated by CoffeeScript 1.9.3
var changeNumbers, inner, outer;
outer = 1;
changeNumbers = function() {
var inner;
inner = -1;
return outer = 10;
};
inner = changeNumbers();

View File

@@ -0,0 +1,12 @@
// Generated by CoffeeScript 1.9.3
var copy, end, middle, numbers, start;
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];
start = numbers.slice(0, 3);
middle = numbers.slice(3, -2);
end = numbers.slice(-2);
copy = numbers.slice(0);

View File

@@ -0,0 +1,4 @@
// Generated by CoffeeScript 1.9.3
var ref, zip;
zip = typeof lottery.drawWinner === "function" ? (ref = lottery.drawWinner().address) != null ? ref.zipcode : void 0 : void 0;

View File

@@ -0,0 +1,23 @@
// Generated by CoffeeScript 1.9.3
var awardMedals, contenders, gold, rest, silver,
slice = [].slice;
gold = silver = rest = "unknown";
awardMedals = function() {
var first, others, second;
first = arguments[0], second = arguments[1], others = 3 <= arguments.length ? slice.call(arguments, 2) : [];
gold = first;
silver = second;
return rest = others;
};
contenders = ["Michael Phelps", "Liu Xiang", "Yao Ming", "Allyson Felix", "Shawn Johnson", "Roman Sebrle", "Guo Jingjing", "Tyson Gay", "Asafa Powell", "Usain Bolt"];
awardMedals.apply(null, contenders);
alert("Gold: " + gold);
alert("Silver: " + silver);
alert("The Field: " + rest);

View File

@@ -0,0 +1,6 @@
// Generated by CoffeeScript 1.9.3
var numbers, ref;
numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
[].splice.apply(numbers, [3, 4].concat(ref = [-3, -4, -5, -6])), ref;

View File

@@ -4,3 +4,5 @@ mobyDick = "Call me Ishmael. Some years ago --
to interest me on shore, I thought I would sail
about a little and see the watery part of the
world..."

View File

@@ -0,0 +1,4 @@
// Generated by CoffeeScript 1.9.3
var mobyDick;
mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world...";

View File

@@ -0,0 +1,24 @@
// Generated by CoffeeScript 1.9.3
switch (day) {
case "Mon":
go(work);
break;
case "Tue":
go(relax);
break;
case "Thu":
go(iceFishing);
break;
case "Fri":
case "Sat":
if (day === bingoDay) {
go(bingo);
go(dancing);
}
break;
case "Sun":
go(church);
break;
default:
go(work);
}

View File

@@ -0,0 +1,19 @@
// Generated by CoffeeScript 1.9.3
var grade, score;
score = 76;
grade = (function() {
switch (false) {
case !(score < 60):
return 'F';
case !(score < 70):
return 'D';
case !(score < 80):
return 'C';
case !(score < 90):
return 'B';
default:
return 'A';
}
})();

View File

@@ -0,0 +1,12 @@
// Generated by CoffeeScript 1.9.3
var error;
try {
allHellBreaksLoose();
catsAndDogsLivingTogether();
} catch (_error) {
error = _error;
print(error);
} finally {
cleanUp();
}

View File

@@ -0,0 +1,22 @@
// Generated by CoffeeScript 1.9.3
var lyrics, num;
if (this.studyingEconomics) {
while (supply > demand) {
buy();
}
while (!(supply > demand)) {
sell();
}
}
num = 6;
lyrics = (function() {
var results;
results = [];
while (num -= 1) {
results.push(num + " little monkeys, jumping on the bed. One fell out and bumped his head.");
}
return results;
})();

View File

@@ -261,8 +261,9 @@ This happens on page load.</p>
<span class="hljs-keyword">for</span> script, i <span class="hljs-keyword">in</span> coffees
<span class="hljs-keyword">do</span> <span class="hljs-function"><span class="hljs-params">(script, i)</span> -&gt;</span>
options = <span class="hljs-attribute">literate</span>: script.type <span class="hljs-keyword">is</span> coffeetypes[<span class="hljs-number">1</span>]
<span class="hljs-keyword">if</span> script.src
CoffeeScript.load script.src,
source = script.src <span class="hljs-keyword">or</span> script.getAttribute(<span class="hljs-string">'data-src'</span>)
<span class="hljs-keyword">if</span> source
CoffeeScript.load source,
<span class="hljs-function"><span class="hljs-params">(param)</span> -&gt;</span>
coffees[i] = param
execute()

View File

@@ -144,7 +144,7 @@ SourceMap = <span class="hljs-built_in">require</span> <span class="hljs-str
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-built_in">exports</span>.VERSION = <span class="hljs-string">'1.9.1'</span>
<div class="content"><div class='highlight'><pre><span class="hljs-built_in">exports</span>.VERSION = <span class="hljs-string">'1.9.3'</span>
<span class="hljs-built_in">exports</span>.FILE_EXTENSIONS = [<span class="hljs-string">'.coffee'</span>, <span class="hljs-string">'.litcoffee'</span>, <span class="hljs-string">'.coffee.md'</span>]</pre></div></div>
@@ -182,6 +182,7 @@ lexer/parser/compiler.</p>
<span class="hljs-keyword">try</span>
fn.call @, code, options
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">if</span> <span class="hljs-keyword">typeof</span> code <span class="hljs-keyword">isnt</span> <span class="hljs-string">'string'</span> <span class="hljs-comment"># Support `CoffeeScript.nodes(tokens)`.</span>
<span class="hljs-keyword">throw</span> helpers.updateSyntaxError err, code, options.filename</pre></div></div>
</li>
@@ -252,8 +253,22 @@ the same name.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> options.sourceMap
<span class="hljs-keyword">if</span> fragment.locationData
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> options.sourceMap</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Do not include empty, whitespace, or semicolon-only fragments.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> fragment.locationData <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> <span class="hljs-regexp">/^[;\s]*$/</span>.test fragment.code
map.add(
[fragment.locationData.first_line, fragment.locationData.first_column]
[currentLine, currentColumn]
@@ -268,11 +283,11 @@ the same name.</p>
</li>
<li id="section-8">
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Copy the code from each fragment into the final JavaScript.</p>
@@ -295,11 +310,11 @@ the same name.</p>
</li>
<li id="section-9">
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Tokenize a string of CoffeeScript code, and return the array of tokens.</p>
@@ -311,11 +326,11 @@ the same name.</p>
</li>
<li id="section-10">
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Parse a string of CoffeeScript code or an array of lexed tokens, and
return the AST. You can then compile it by calling <code>.compile()</code> on the root,
@@ -332,11 +347,11 @@ or traverse it by using <code>.traverseChildren()</code> with a callback.</p>
</li>
<li id="section-11">
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Compile and execute a string of CoffeeScript (on the server), correctly
setting <code>__filename</code>, <code>__dirname</code>, and relative <code>require()</code>.</p>
@@ -349,11 +364,11 @@ setting <code>__filename</code>, <code>__dirname</code>, and relative <code>requ
</li>
<li id="section-12">
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Set the filename.</p>
@@ -365,11 +380,11 @@ setting <code>__filename</code>, <code>__dirname</code>, and relative <code>requ
</li>
<li id="section-13">
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Clear the module cache.</p>
@@ -380,11 +395,11 @@ setting <code>__filename</code>, <code>__dirname</code>, and relative <code>requ
</li>
<li id="section-14">
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Assign paths for node_modules loading</p>
@@ -399,11 +414,11 @@ setting <code>__filename</code>, <code>__dirname</code>, and relative <code>requ
</li>
<li id="section-15">
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Compile.</p>
@@ -418,11 +433,11 @@ setting <code>__filename</code>, <code>__dirname</code>, and relative <code>requ
</li>
<li id="section-16">
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
The CoffeeScript REPL uses this to run the input.</p>
@@ -452,11 +467,11 @@ The CoffeeScript REPL uses this to run the input.</p>
</li>
<li id="section-17">
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>define module/require only if they chose not to specify their own</p>
@@ -472,11 +487,11 @@ The CoffeeScript REPL uses this to run the input.</p>
</li>
<li id="section-18">
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>use the same hack node currently uses for their own REPL</p>
@@ -498,11 +513,11 @@ The CoffeeScript REPL uses this to run the input.</p>
</li>
<li id="section-19">
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Throw error with deprecation warning when depending upon implicit <code>require.extensions</code> registration</p>
@@ -526,11 +541,11 @@ The CoffeeScript REPL uses this to run the input.</p>
</li>
<li id="section-20">
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>As the filename and code of a dynamically loaded file will be different
from the original file compiled with CoffeeScript.run, add that
@@ -545,11 +560,11 @@ information to error so it can be pretty-printed later.</p>
</li>
<li id="section-21">
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Instantiate a Lexer for our use here.</p>
@@ -560,11 +575,11 @@ information to error so it can be pretty-printed later.</p>
</li>
<li id="section-22">
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>The real Lexer produces a generic stream of tokens. This object provides a
thin wrapper around it, compatible with the Jison API. We can then pass it
@@ -592,11 +607,11 @@ directly as a “Jison lexer”.</p>
</li>
<li id="section-23">
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Make all the AST nodes visible to the parser.</p>
@@ -607,11 +622,11 @@ directly as a “Jison lexer”.</p>
</li>
<li id="section-24">
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Override Jisons default error handling function.</p>
@@ -622,11 +637,11 @@ directly as a “Jison lexer”.</p>
</li>
<li id="section-25">
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Disregard Jisons message, it contains redundant line numer information.
Disregard the token, we take its value directly from the lexer in case
@@ -650,11 +665,11 @@ the error is caused by a generated token which might refer to its origin.</p>
</li>
<li id="section-26">
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>The second argument has a <code>loc</code> property, which should have the location
data for this token. Unfortunately, Jison seems to send an outdated <code>loc</code>
@@ -668,11 +683,11 @@ from the lexer.</p>
</li>
<li id="section-27">
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>Based on <a href="http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js">http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js</a>
Modified to handle sourceMap</p>
@@ -700,11 +715,11 @@ Modified to handle sourceMap</p>
</li>
<li id="section-28">
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>Check for a sourceMap position</p>
@@ -745,11 +760,11 @@ Modified to handle sourceMap</p>
</li>
<li id="section-29">
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Map of filenames -&gt; sourceMap object.</p>
@@ -760,11 +775,11 @@ Modified to handle sourceMap</p>
</li>
<li id="section-30">
<li id="section-31">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-30">&#182;</a>
<a class="pilcrow" href="#section-31">&#182;</a>
</div>
<p>Generates the source map for a coffee file and stores it in the local cache variable.</p>
@@ -779,11 +794,11 @@ Modified to handle sourceMap</p>
</li>
<li id="section-31">
<li id="section-32">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-31">&#182;</a>
<a class="pilcrow" href="#section-32">&#182;</a>
</div>
<p>Based on <a href="http://goo.gl/ZTx1p">michaelficarra/CoffeeScriptRedux</a>
NodeJS / V8 have no support for transforming positions in stack traces using

View File

@@ -211,6 +211,7 @@ useWinPathSep = path.sep <span class="hljs-keyword">is</span> <span class="hljs
[ <span class="hljs-string">'--no-header'</span>, <span class="hljs-string">'suppress the "Generated by" header'</span>]
[<span class="hljs-string">'-o'</span>, <span class="hljs-string">'--output [DIR]'</span>, <span class="hljs-string">'set the output directory for compiled JavaScript'</span>]
[<span class="hljs-string">'-p'</span>, <span class="hljs-string">'--print'</span>, <span class="hljs-string">'print out the compiled JavaScript'</span>]
[<span class="hljs-string">'-r'</span>, <span class="hljs-string">'--require [MODULE*]'</span>, <span class="hljs-string">'require the given module before eval or REPL'</span>]
[<span class="hljs-string">'-s'</span>, <span class="hljs-string">'--stdio'</span>, <span class="hljs-string">'listen for and compile scripts over stdio'</span>]
[<span class="hljs-string">'-l'</span>, <span class="hljs-string">'--literate'</span>, <span class="hljs-string">'treat stdio as literate style coffee-script'</span>]
[<span class="hljs-string">'-t'</span>, <span class="hljs-string">'--tokens'</span>, <span class="hljs-string">'print out the tokens that the lexer/rewriter produce'</span>]
@@ -236,8 +237,7 @@ sources = []
sourceCode = []
notSources = {}
watchedDirs = {}
optionParser = <span class="hljs-literal">null</span>
jsToSources = {}</pre></div></div>
optionParser = <span class="hljs-literal">null</span></pre></div></div>
</li>
@@ -273,6 +273,8 @@ Many flags cause us to divert before compiling anything. Flags passed after
</div>
<div class="content"><div class='highlight'><pre> replCliOpts = <span class="hljs-attribute">useGlobal</span>: <span class="hljs-literal">yes</span>
opts.prelude = makePrelude opts.<span class="hljs-built_in">require</span> <span class="hljs-keyword">if</span> opts.<span class="hljs-built_in">require</span>
replCliOpts.prelude = opts.prelude
<span class="hljs-keyword">return</span> forkNode() <span class="hljs-keyword">if</span> opts.nodejs
<span class="hljs-keyword">return</span> usage() <span class="hljs-keyword">if</span> opts.help
<span class="hljs-keyword">return</span> version() <span class="hljs-keyword">if</span> opts.version
@@ -303,7 +305,14 @@ Many flags cause us to divert before compiling anything. Flags passed after
'''</span>
<span class="hljs-keyword">for</span> source <span class="hljs-keyword">in</span> opts.arguments
source = path.resolve source
compilePath source, <span class="hljs-literal">yes</span>, source</pre></div></div>
compilePath source, <span class="hljs-literal">yes</span>, source
<span class="hljs-function"><span class="hljs-title">makePrelude</span> = <span class="hljs-params">(requires)</span> -&gt;</span>
requires.map <span class="hljs-function"><span class="hljs-params">(<span class="hljs-built_in">module</span>)</span> -&gt;</span>
[_, name, <span class="hljs-built_in">module</span>] = match <span class="hljs-keyword">if</span> match = <span class="hljs-built_in">module</span>.match(<span class="hljs-regexp">/^(.*)=(.*)$/</span>)
name ||= helpers.baseFileName <span class="hljs-built_in">module</span>, <span class="hljs-literal">yes</span>, useWinPathSep
<span class="hljs-string">"<span class="hljs-subst">#{name}</span> = require('<span class="hljs-subst">#{<span class="hljs-built_in">module</span>}</span>')"</span>
.join <span class="hljs-string">';'</span></pre></div></div>
</li>
@@ -395,6 +404,7 @@ requested options. If evaluating the script directly sets <code>__filename</code
printLine CoffeeScript.nodes(t.input, t.options).toString().trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.run
CoffeeScript.register()
CoffeeScript.eval opts.prelude, t.options <span class="hljs-keyword">if</span> opts.prelude
CoffeeScript.run t.input, t.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.join <span class="hljs-keyword">and</span> t.file <span class="hljs-keyword">isnt</span> o.join
t.input = helpers.invertLiterate t.input <span class="hljs-keyword">if</span> helpers.isLiterate file
@@ -676,12 +686,6 @@ same directory as the <code>.js</code> file.</p>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">writeJs</span> = <span class="hljs-params">(base, sourcePath, js, jsPath, generatedSourceMap = <span class="hljs-literal">null</span>)</span> -&gt;</span>
sourceMapPath = outputPath sourcePath, base, <span class="hljs-string">".js.map"</span>
jsDir = path.dirname jsPath
<span class="hljs-keyword">if</span> jsPath <span class="hljs-keyword">of</span> jsToSources
printLine <span class="hljs-string">"Error: The two following source files have the same output file:"</span>
printLine <span class="hljs-string">" "</span> + jsToSources[jsPath]
printLine <span class="hljs-string">" "</span> + sourcePath
process.exit <span class="hljs-number">1</span>
jsToSources[jsPath] = sourcePath
<span class="hljs-function"><span class="hljs-title">compile</span> = -&gt;</span>
<span class="hljs-keyword">if</span> opts.compile
js = <span class="hljs-string">' '</span> <span class="hljs-keyword">if</span> js.length &lt;= <span class="hljs-number">0</span>
@@ -832,7 +836,7 @@ the <code>node</code> binary, preserving the other options.</p>
p = spawn process.execPath, nodeArgs.concat(args),
<span class="hljs-attribute">cwd</span>: process.cwd()
<span class="hljs-attribute">env</span>: process.env
<span class="hljs-attribute">customFds</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
<span class="hljs-attribute">stdio</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
p.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span> process.exit code</pre></div></div>
</li>

View File

@@ -583,7 +583,7 @@ it already.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> process?
colorsEnabled = process.stdout.isTTY <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> process.env.NODE_DISABLE_COLORS
colorsEnabled = process.stdout?.isTTY <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> process.env?.NODE_DISABLE_COLORS
<span class="hljs-keyword">if</span> <span class="hljs-property">@colorful</span> ? colorsEnabled
<span class="hljs-function"><span class="hljs-title">colorize</span> = <span class="hljs-params">(str)</span> -&gt;</span> <span class="hljs-string">"\x1B[1;31m<span class="hljs-subst">#{str}</span>\x1B[0m"</span>

View File

@@ -403,7 +403,9 @@ though <code>is</code> means <code>===</code> otherwise.</p>
<span class="hljs-property">@error</span> <span class="hljs-string">"reserved word '<span class="hljs-subst">#{id}</span>'"</span>, <span class="hljs-attribute">length</span>: id.length
<span class="hljs-keyword">unless</span> forcedIdentifier
id = COFFEE_ALIAS_MAP[id] <span class="hljs-keyword">if</span> id <span class="hljs-keyword">in</span> COFFEE_ALIASES
<span class="hljs-keyword">if</span> id <span class="hljs-keyword">in</span> COFFEE_ALIASES
alias = id
id = COFFEE_ALIAS_MAP[id]
tag = <span class="hljs-keyword">switch</span> id
<span class="hljs-keyword">when</span> <span class="hljs-string">'!'</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'UNARY'</span>
<span class="hljs-keyword">when</span> <span class="hljs-string">'=='</span>, <span class="hljs-string">'!='</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'COMPARE'</span>
@@ -413,6 +415,7 @@ though <code>is</code> means <code>===</code> otherwise.</p>
<span class="hljs-keyword">else</span> tag
tagToken = <span class="hljs-property">@token</span> tag, id, <span class="hljs-number">0</span>, idLength
tagToken.origin = [tag, alias, tagToken[<span class="hljs-number">2</span>]] <span class="hljs-keyword">if</span> alias
tagToken.variable = <span class="hljs-keyword">not</span> forcedIdentifier
<span class="hljs-keyword">if</span> poppedToken
[tagToken[<span class="hljs-number">2</span>].first_line, tagToken[<span class="hljs-number">2</span>].first_column] =
@@ -484,7 +487,7 @@ interpolation.</p>
{tokens, <span class="hljs-attribute">index</span>: end} = <span class="hljs-property">@matchWithInterpolations</span> regex, quote
$ = tokens.length - <span class="hljs-number">1</span>
delimiter = quote[<span class="hljs-number">0</span>]
delimiter = quote.charAt(<span class="hljs-number">0</span>)
<span class="hljs-keyword">if</span> heredoc</pre></div></div>
</li>
@@ -817,6 +820,7 @@ parentheses that indicate a method call from regular parentheses, and so on.</p>
[..., prev] = <span class="hljs-property">@tokens</span>
<span class="hljs-keyword">if</span> value <span class="hljs-keyword">is</span> <span class="hljs-string">'='</span> <span class="hljs-keyword">and</span> prev
<span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> prev[<span class="hljs-number">1</span>].reserved <span class="hljs-keyword">and</span> prev[<span class="hljs-number">1</span>] <span class="hljs-keyword">in</span> JS_FORBIDDEN
prev = prev.origin <span class="hljs-keyword">if</span> prev.origin
<span class="hljs-property">@error</span> <span class="hljs-string">"reserved word '<span class="hljs-subst">#{prev[<span class="hljs-number">1</span>]}</span>' can't be assigned"</span>, prev[<span class="hljs-number">2</span>]
<span class="hljs-keyword">if</span> prev[<span class="hljs-number">1</span>] <span class="hljs-keyword">in</span> [<span class="hljs-string">'||'</span>, <span class="hljs-string">'&amp;&amp;'</span>]
prev[<span class="hljs-number">0</span>] = <span class="hljs-string">'COMPOUND_ASSIGN'</span>
@@ -1766,7 +1770,7 @@ HEREDOC_INDENT = <span class="hljs-regexp">/\n+([^\n\S]*)(?=\S)/g</span></pr
| \\[^\n] <span class="hljs-comment"># anything but newlines escaped</span>
| \[ <span class="hljs-comment"># character class</span>
(?: \\[^\n] | [^ \] \n \\ ] )*
]
\]
)*) (/)?
///</span>

View File

@@ -328,7 +328,7 @@ object with their parent closure, to preserve the expected lexical scope.</p>
meth = <span class="hljs-string">'call'</span>
func = <span class="hljs-keyword">new</span> Value func, [<span class="hljs-keyword">new</span> Access <span class="hljs-keyword">new</span> Literal meth]
parts = (<span class="hljs-keyword">new</span> Call func, args).compileNode o
<span class="hljs-keyword">if</span> func.isGenerator
<span class="hljs-keyword">if</span> func.isGenerator <span class="hljs-keyword">or</span> func.base?.isGenerator
parts.unshift <span class="hljs-property">@makeCode</span> <span class="hljs-string">"(yield* "</span>
parts.push <span class="hljs-property">@makeCode</span> <span class="hljs-string">")"</span>
parts</pre></div></div>
@@ -1311,7 +1311,7 @@ at the same position.</p>
<span class="hljs-attribute">makeReturn</span>: THIS
<span class="hljs-attribute">compileNode</span>: <span class="hljs-function"><span class="hljs-params">(o, level)</span> -&gt;</span>
comment = <span class="hljs-property">@comment</span>.replace <span class="hljs-regexp">/^(\s*)# /gm</span>, <span class="hljs-string">"$1 * "</span>
comment = <span class="hljs-property">@comment</span>.replace <span class="hljs-regexp">/^(\s*)#(?=\s)/gm</span>, <span class="hljs-string">"$1 *"</span>
code = <span class="hljs-string">"/*<span class="hljs-subst">#{multident comment, <span class="hljs-property">@tab</span>}</span><span class="hljs-subst">#{<span class="hljs-keyword">if</span> <span class="hljs-string">'\n'</span> <span class="hljs-keyword">in</span> comment <span class="hljs-keyword">then</span> <span class="hljs-string">"\n<span class="hljs-subst">#{<span class="hljs-property">@tab</span>}</span>"</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>}</span> */"</span>
code = o.indent + code <span class="hljs-keyword">if</span> (level <span class="hljs-keyword">or</span> o.level) <span class="hljs-keyword">is</span> LEVEL_TOP
[<span class="hljs-property">@makeCode</span>(<span class="hljs-string">"\n"</span>), <span class="hljs-property">@makeCode</span>(code)]</pre></div></div>
@@ -2029,7 +2029,7 @@ is the index of the beginning.</p>
indent = <span class="hljs-keyword">if</span> prop <span class="hljs-keyword">instanceof</span> Comment <span class="hljs-keyword">then</span> <span class="hljs-string">''</span> <span class="hljs-keyword">else</span> idt
indent += TAB <span class="hljs-keyword">if</span> hasDynamic <span class="hljs-keyword">and</span> i &lt; dynamicIndex
<span class="hljs-keyword">if</span> prop <span class="hljs-keyword">instanceof</span> Assign <span class="hljs-keyword">and</span> prop.variable <span class="hljs-keyword">instanceof</span> Value <span class="hljs-keyword">and</span> prop.variable.hasProperties()
prop.variable.error <span class="hljs-string">'Invalid object key'</span>
prop.variable.error <span class="hljs-string">'invalid object key'</span>
<span class="hljs-keyword">if</span> prop <span class="hljs-keyword">instanceof</span> Value <span class="hljs-keyword">and</span> prop.<span class="hljs-keyword">this</span>
prop = <span class="hljs-keyword">new</span> Assign prop.properties[<span class="hljs-number">0</span>].name, prop, <span class="hljs-string">'object'</span>
<span class="hljs-keyword">if</span> prop <span class="hljs-keyword">not</span> <span class="hljs-keyword">instanceof</span> Comment

View File

@@ -243,11 +243,7 @@ parens. Unwrap all that.</p>
<span class="hljs-keyword">new</span> Assign (<span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> Literal <span class="hljs-string">'_'</span>), ast, <span class="hljs-string">'='</span>
]
js = ast.compile {<span class="hljs-attribute">bare</span>: <span class="hljs-literal">yes</span>, <span class="hljs-attribute">locals</span>: Object.keys(context), referencedVars}
result = <span class="hljs-keyword">if</span> context <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js, filename
<span class="hljs-keyword">else</span>
vm.runInContext js, context, filename
cb <span class="hljs-literal">null</span>, result
cb <span class="hljs-literal">null</span>, runInContext js, context, filename
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
@@ -266,6 +262,12 @@ parens. Unwrap all that.</p>
<div class="content"><div class='highlight'><pre> updateSyntaxError err, input
cb err
<span class="hljs-function"><span class="hljs-title">runInContext</span> = <span class="hljs-params">(js, context, filename)</span> -&gt;</span>
<span class="hljs-keyword">if</span> context <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js, filename
<span class="hljs-keyword">else</span>
vm.runInContext js, context, filename
<span class="hljs-function"><span class="hljs-title">addMultilineHandler</span> = <span class="hljs-params">(repl)</span> -&gt;</span>
{rli, inputStream, outputStream} = repl</pre></div></div>
@@ -455,7 +457,8 @@ parens. Unwrap all that.</p>
<div class="content"><div class='highlight'><pre> readFd = fs.openSync filename, <span class="hljs-string">'r'</span>
buffer = <span class="hljs-keyword">new</span> Buffer(size)
fs.readSync readFd, buffer, <span class="hljs-number">0</span>, size, stat.size - size</pre></div></div>
fs.readSync readFd, buffer, <span class="hljs-number">0</span>, size, stat.size - size
fs.close readFd</pre></div></div>
</li>
@@ -525,7 +528,7 @@ parens. Unwrap all that.</p>
<div class="content"><div class='highlight'><pre> fs.write fd, <span class="hljs-string">"<span class="hljs-subst">#{code}</span>\n"</span>
lastLine = code
repl.rli.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>,<span class="hljs-function"> -&gt;</span> fs.close fd</pre></div></div>
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>,<span class="hljs-function"> -&gt;</span> fs.close fd</pre></div></div>
</li>
@@ -576,7 +579,8 @@ parens. Unwrap all that.</p>
process.argv = [<span class="hljs-string">'coffee'</span>].concat process.argv[<span class="hljs-number">2.</span>.]
opts = merge replDefaults, opts
repl = nodeREPL.start opts
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>,<span class="hljs-function"> -&gt;</span> repl.outputStream.write <span class="hljs-string">'\n'</span>
runInContext opts.prelude, repl.context, <span class="hljs-string">'prelude'</span> <span class="hljs-keyword">if</span> opts.prelude
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>,<span class="hljs-function"> -&gt;</span> repl.outputStream.write <span class="hljs-string">'\n'</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> repl.rli.closed
addMultilineHandler repl
addHistory repl, opts.historyFile, opts.historyMaxInputSize <span class="hljs-keyword">if</span> opts.historyFile</pre></div></div>

View File

@@ -632,7 +632,7 @@ that creates grammatical ambiguities.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> IMPLICIT_FUNC <span class="hljs-keyword">and</span>
<span class="hljs-property">@indexOfTag</span>(i + <span class="hljs-number">1</span>, <span class="hljs-string">'INDENT'</span>, <span class="hljs-literal">null</span>, <span class="hljs-string">':'</span>) &gt; -<span class="hljs-number">1</span> <span class="hljs-keyword">and</span>
<span class="hljs-property">@indexOfTag</span>(i + <span class="hljs-number">1</span>, <span class="hljs-string">'INDENT'</span>) &gt; -<span class="hljs-number">1</span> <span class="hljs-keyword">and</span> <span class="hljs-property">@looksObjectish</span>(i + <span class="hljs-number">2</span>) <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> <span class="hljs-property">@findTagsBackwards</span>(i, [<span class="hljs-string">'CLASS'</span>, <span class="hljs-string">'EXTENDS'</span>, <span class="hljs-string">'IF'</span>, <span class="hljs-string">'CATCH'</span>,
<span class="hljs-string">'SWITCH'</span>, <span class="hljs-string">'LEADING_WHEN'</span>, <span class="hljs-string">'FOR'</span>, <span class="hljs-string">'WHILE'</span>, <span class="hljs-string">'UNTIL'</span>])
startImplicitCall i + <span class="hljs-number">1</span>

View File

@@ -110,7 +110,7 @@
<p>
<b>Latest Version:</b>
<a href="http://github.com/jashkenas/coffeescript/tarball/1.9.1">1.9.1</a>
<a href="http://github.com/jashkenas/coffeescript/tarball/1.9.3">1.9.3</a>
</p>
<pre>npm install -g coffee-script</pre>
@@ -531,6 +531,10 @@ Expressions
use <tt>by</tt>, for example:<br />
<tt>evens = (x for x in [0..10] by 2)</tt>
</p>
<p>
If you don't need the current iteration value you may omit it:<br />
<tt>browser.closeCurrentTab() for [0...count]</tt>
</p>
<p>
Comprehensions can also be used to iterate over the keys and values in
an object. Use <tt>of</tt> to signal comprehension over the properties of
@@ -658,8 +662,12 @@ Expressions
test for JavaScript object-key presence.
</p>
<p>
To simplify math expressions, <tt>**</tt> can be used for exponentiation, <tt>//</tt> performs integer division and <tt>%%</tt> provides true mathematical modulo.
To simplify math expressions, <tt>**</tt> can be used for exponentiation
and <tt>//</tt> performs integer division. <tt>%</tt> works just like in
JavaScript, while <tt>%%</tt> provides
<a href="http://en.wikipedia.org/wiki/Modulo_operation">“dividend dependent modulo”</a>:
</p>
<%= codeFor('modulo') %>
<p>
All together now:
</p>
@@ -806,7 +814,7 @@ Expressions
it to the current value of <tt>this</tt>, right on the spot. This is helpful
when using callback-based libraries like Prototype or jQuery, for creating
iterator functions to pass to <tt>each</tt>, or event-handler functions
to use with <tt>bind</tt>. Functions created with the fat arrow are able to access
to use with <tt>on</tt>. Functions created with the fat arrow are able to access
properties of the <tt>this</tt> where they're defined.
</p>
<%= codeFor('fat_arrow') %>
@@ -821,12 +829,16 @@ Expressions
constructed.
</p>
<p>
CoffeeScript functions also support
CoffeeScript functions also support
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">ES6 generator functions</a>
through the <tt>yield</tt> keyword. There's no <tt>function*(){}</tt>
through the <tt>yield</tt> keyword. There's no <tt>function*(){}</tt>
nonsense &mdash; a generator in CoffeeScript is simply a function that yields.
</p>
<%= codeFor('generators', 'ps.next().value') %>
<p>
<tt>yield*</tt> is called <tt>yield from</tt>, and <tt>yield return</tt>
may be used if you need to force a generator that doesn't yield.
</p>
<p>
<span id="embedded" class="bookmark"></span>
@@ -862,8 +874,9 @@ Expressions
<p>
<span id="try" class="bookmark"></span>
<b class="header">Try/Catch/Finally</b>
Try/catch statements are just about the same as JavaScript (although
they work as expressions).
Try-expressions have the same semantics as try-statements in JavaScript,
though in CoffeeScript, you may omit <em>both</em> the catch and finally
parts. The catch part may also omit the error parameter if it is not needed.
</p>
<%= codeFor('try') %>
@@ -882,7 +895,8 @@ Expressions
<b class="header">String Interpolation, Block Strings, and Block Comments</b>
Ruby-style string interpolation is included in CoffeeScript. Double-quoted
strings allow for interpolated values, using <tt>#{ ... }</tt>,
and single-quoted strings are literal.
and single-quoted strings are literal. You may even use interpolation in
object keys.
</p>
<%= codeFor('interpolation', 'sentence') %>
<p>
@@ -1054,6 +1068,8 @@ Expressions
<a href="http://www.packtpub.com/coffeescript-application-development/book">CoffeeScript Application Development</a>
from Packt, introduces CoffeeScript while
walking through the process of building a demonstration web application.
A <a href="https://www.packtpub.com/web-development/coffeescript-application-development-cookbook">CoffeeScript Application Development Coookbook</a>
with over 90 "recipes" is also available.
</li>
<li>
<a href="http://www.manning.com/lee/">CoffeeScript in Action</a>
@@ -1203,21 +1219,75 @@ Expressions
Change Log
</h2>
<p>
<%= releaseHeader('2015-05-14', '1.9.3', '1.9.2') %>
<ul>
<li>
Bugfix for interpolation in the first key of an object literal in an
implicit call.
</li>
<li>
Fixed broken error messages in the REPL, as well as a few minor bugs
with the REPL.
</li>
<li>
Fixed source mappings for tokens at the beginning of lines when
compiling with the <tt>--bare</tt> option. This has the nice side
effect of generating smaller source maps.
</li>
<li>
Slight formatting improvement of compiled block comments.
</li>
<li>
Better error messages for <tt>on</tt>, <tt>off</tt>, <tt>yes</tt> and
<tt>no</tt>.
</li>
</ul>
</p>
<p>
<%= releaseHeader('2015-04-15', '1.9.2', '1.9.1') %>
<ul>
<li>
Fixed a <b>watch</b> mode error introduced in 1.9.1 when compiling
multiple files with the same filename.
</li>
<li>
Bugfix for <tt>yield</tt> around expressions containing
<tt>this</tt>.
</li>
<li>
Added a Ruby-style <tt>-r</tt> option to the REPL, which allows
requiring a module before execution with <tt>--eval</tt> or
<tt>--interactive</tt>.
</li>
<li>
In <tt>&lt;script type="text/coffeescript"&gt;</tt> tags, to avoid
possible duplicate browser requests for .coffee files,
you can now use the <tt>data-src</tt> attribute instead of <tt>src</tt>.
</li>
<li>
Minor bug fixes for IE8, strict ES5 regular expressions and Browserify.
</li>
</ul>
</p>
<p>
<%= releaseHeader('2015-02-18', '1.9.1', '1.9.0') %>
<ul>
<li>
Interpolation now works in object literal keys (again). You can use this to
Interpolation now works in object literal keys (again). You can use this to
dynamically name properties.
</li>
<li>
Internal compiler names no longer start with underscores. This makes
Internal compiler variable names no longer start with underscores. This makes
the generated JavaScript a bit prettier, and also fixes an issue with
the completely broken and ungodly way that AngularJS "parses" function
arguments.
</li>
<li>
Fixed a few <tt>yield</tt>-related bugs.
Fixed a few <tt>yield</tt>-related edge cases with <tt>yield return</tt>
and <tt>yield throw</tt>.
</li>
<li>
Minor bug fixes and various improvements to compiler error messages.
@@ -1230,10 +1300,10 @@ Expressions
<ul>
<li>
CoffeeScript now supports ES6 generators. A generator is simply a function
that <tt>yield</tt>s.
that <tt>yield</tt>s.
</li>
<li>
More robust parsing and improved error messages for strings and regexes —
More robust parsing and improved error messages for strings and regexes —
especially with respect to interpolation.
</li>
<li>

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var volume, winner;
if (ignition === true) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var courses, dish, food, foods, i, j, k, l, len, len1, len2, ref;
ref = ['toast', 'cheese', 'wine'];

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
/*
SkinnyMochaHalfCaffScript Compiler v1.0

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var fs;
fs = require('fs');

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
$('body').click(function(e) {
return $('.box').fadeIn('fast').addClass('.active');
}).css('background', 'white');

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var Animal, Horse, Snake, sam, tom,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var cholesterol, healthy;
cholesterol = 127;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var date, mood;
if (singing) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var Person, tim;
Person = (function() {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var fill;
fill = function(container, liquid) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var filename, fn, i, len;
fn = function(filename) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var hi;
hi = function() {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var footprints, solipsism, speed;
if ((typeof mind !== "undefined" && mind !== null) && (typeof world === "undefined" || world === null)) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var first, last, ref, text;
text = "Every literary critic believes he will outwit history and have the last word";

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var eldest, grade;
grade = function(student) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var one, six, three, two;
six = (one = 1) + (two = 2) + (three = 3);

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var globals, name;
globals = ((function() {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var error;
alert((function() {

View File

@@ -1,10 +1,10 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var Account;
Account = function(customer, cart) {
this.customer = customer;
this.cart = cart;
return $('.shopping_cart').bind('click', (function(_this) {
return $('.shopping_cart').on('click', (function(_this) {
return function(event) {
return _this.customer.purchase(_this.cart);
};

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var cube, square;
square = function(x) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var perfectSquares;
perfectSquares = function*() {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var html;
html = "<strong>\n cup of coffeescript\n</strong>";

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var OPERATOR;
OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var author, quote, sentence;
author = "Wittgenstein";

View File

@@ -0,0 +1,8 @@
// Generated by CoffeeScript 1.9.3
var modulo = function(a, b) { return (+a % (b = +b) + b) % b; };
-7 % 5 === -2;
modulo(-7, 5) === 3;
tabs.selectTabAtIndex(modulo(tabs.currentIndex - count, tabs.length));

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var city, forecast, ref, temp, weatherReport;
weatherReport = function(location) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var age, ages, child, yearsOld;
yearsOld = {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var city, futurists, name, ref, ref1, street;
futurists = {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var bitlist, kids, singers, song;
song = ["do", "re", "mi", "fa", "so"];

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
$('.account').attr({
"class": 'active'
});

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var cubes, list, math, num, number, opposite, race, square,
slice = [].slice;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var ref, theBait, theSwitch;
theBait = 1000;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var close, contents, i, open, ref, tag,
slice = [].slice;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
String.prototype.dasherize = function() {
return this.replace(/_/g, "-");
};

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var countdown, num;
countdown = (function() {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var changeNumbers, inner, outer;
outer = 1;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var copy, end, middle, numbers, start;
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var ref, zip;
zip = typeof lottery.drawWinner === "function" ? (ref = lottery.drawWinner().address) != null ? ref.zipcode : void 0 : void 0;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var awardMedals, contenders, gold, rest, silver,
slice = [].slice;

Some files were not shown because too many files have changed in this diff Show More