Browse files

rebuild autogenerated files; fix merge errors

  • Loading branch information...
1 parent ff457e3 commit 346d2a958705054be8754a59918f1eaba4b044eb @maxtaco committed Jan 13, 2012
View
6 lib/coffee-script/cake.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.2.1-pre
(function() {
var CoffeeScript, cakefileDirectory, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks;
@@ -66,8 +67,9 @@
};
printTasks = function() {
- var cakefilePath, desc, name, spaces, task;
- cakefilePath = path.join(path.relative(__originalDirname, process.cwd()), 'Cakefile');
+ var cakefilePath, desc, name, relative, spaces, task;
+ relative = path.relative || path.resolve;
+ cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile');
console.log("" + cakefilePath + " defines the following tasks:\n");
for (name in tasks) {
task = tasks[name];
View
11 lib/coffee-script/coffee-script.js
@@ -1,6 +1,7 @@
+// Generated by CoffeeScript 1.2.1-pre
(function() {
var Lexer, RESERVED, compile, fs, lexer, parser, path, tame, vm, _ref,
- __hasProp = Object.prototype.hasOwnProperty;
+ __hasProp = {}.hasOwnProperty;
fs = require('fs');
@@ -35,17 +36,20 @@
exports.helpers = require('./helpers');
exports.compile = compile = function(code, options) {
- var merge;
+ var header, js, merge;
if (options == null) options = {};
merge = exports.helpers.merge;
try {
- return (tame.transform(parser.parse(lexer.tokenize(code)))).compile(merge({}, options));
+ js = (tame.transform(parser.parse(lexer.tokenize(code)))).compile(options);
+ if (!options.header) return js;
} catch (err) {
if (options.filename) {
err.message = "In " + options.filename + ", " + err.message;
}
throw err;
}
+ header = "Generated by CoffeeScript " + this.VERSION;
+ return "// " + header + "\n" + js;
};
exports.tokens = function(code, options) {
@@ -62,6 +66,7 @@
exports.run = function(code, options) {
var mainModule;
+ if (options == null) options = {};
mainModule = require.main;
mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.';
mainModule.moduleCache && (mainModule.moduleCache = {});
View
5 lib/coffee-script/lexer.js
@@ -1,6 +1,7 @@
+// Generated by CoffeeScript 1.2.1-pre
(function() {
var BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, starts, _ref, _ref2,
- __indexOf = Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
_ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES;
@@ -137,7 +138,7 @@
if (!(match = NUMBER.exec(this.chunk))) return 0;
number = match[0];
lexedLength = number.length;
- if (binaryLiteral = /0b([01]+)/.exec(number)) {
+ if (binaryLiteral = /0b([01]+)/i.exec(number)) {
number = (parseInt(binaryLiteral[1], 2)).toString();
}
this.token('NUMBER', number);
View
11 lib/coffee-script/nodes.js
@@ -1,8 +1,9 @@
+// Generated by CoffeeScript 1.2.1-pre
(function() {
var Access, Arr, Assign, Await, Base, Block, Call, Class, Closure, Code, Comment, CpsCascade, Defer, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, InlineDeferral, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NULL, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, Scope, Slice, Slot, Splat, Switch, TAB, THIS, TameRequire, TameReturnValue, TameTailCall, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, starts, tame, unfoldSoak, utility, _ref,
- __hasProp = Object.prototype.hasOwnProperty,
+ __hasProp = {}.hasOwnProperty,
__extends = 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; },
- __indexOf = Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
Scope = require('./scope').Scope;
@@ -3652,13 +3653,13 @@
return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }';
},
indexOf: function() {
- return "Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }";
+ return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }";
},
hasProp: function() {
- return 'Object.prototype.hasOwnProperty';
+ return '{}.hasOwnProperty';
},
slice: function() {
- return 'Array.prototype.slice';
+ return '[].slice';
}
};
View
5 lib/coffee-script/rewriter.js
@@ -1,7 +1,8 @@
+// Generated by CoffeeScript 1.2.1-pre
(function() {
var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref,
- __indexOf = Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
- __slice = Array.prototype.slice;
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+ __slice = [].slice;
exports.Rewriter = (function() {
View
3 lib/coffee-script/tame.js
@@ -1,6 +1,7 @@
+// Generated by CoffeeScript 1.2.1-pre
(function() {
var Deferrals, Rendezvous, makeDeferReturn,
- __slice = Array.prototype.slice;
+ __slice = [].slice;
exports.transform = function(x) {
return x.tameTransform();
View
3 lib/coffee-script/tamelib.js
@@ -1,6 +1,7 @@
+// Generated by CoffeeScript 1.2.1-pre
(function() {
var Pipeliner, tame, tame_internals, __tame_k, _timeout,
- __slice = Array.prototype.slice;
+ __slice = [].slice;
__tame_k = function() {};
View
2 src/coffee-script.coffee
@@ -36,7 +36,7 @@ exports.helpers = require './helpers'
exports.compile = compile = (code, options = {}) ->
{merge} = exports.helpers
try
- js = (tamer.transform parser.parse lexer.tokenize code).compile options
+ js = (tame.transform parser.parse lexer.tokenize code).compile options
return js unless options.header
catch err
err.message = "In #{options.filename}, #{err.message}" if options.filename

0 comments on commit 346d2a9

Please sign in to comment.