Skip to content
Browse files

map option

  • Loading branch information...
1 parent 68f018c commit 4d5a352d10ea331431608e6024434ff359707251 @itrelease itrelease committed Apr 11, 2012
View
4 lib/coffee-script/browser.js
@@ -9,13 +9,13 @@
CoffeeScript["eval"] = function(code, options) {
if (options == null) options = {};
if (options.bare == null) options.bare = true;
- return eval(CoffeeScript.compile(code, options));
+ return eval((CoffeeScript.compile(code, options)).toString());
};
CoffeeScript.run = function(code, options) {
if (options == null) options = {};
options.bare = true;
- return Function(CoffeeScript.compile(code, options))();
+ return Function((CoffeeScript.compile(code, options)).toString())();
};
if (typeof window === "undefined" || window === null) return;
View
11 lib/coffee-script/coffee-script.js
@@ -1,12 +1,14 @@
// Generated by CoffeeScript 1.2.1-pre
(function() {
- var Lexer, RESERVED, compile, fs, lexer, parser, path, vm, _ref,
+ var Lexer, RESERVED, compile, fs, lexer, parser, path, sourceMap, vm, _ref,
__hasProp = {}.hasOwnProperty;
fs = require('fs');
path = require('path');
+ sourceMap = require('source-map');
+
_ref = require('./lexer'), Lexer = _ref.Lexer, RESERVED = _ref.RESERVED;
parser = require('./parser').parser;
@@ -38,7 +40,12 @@
if (options == null) options = {};
merge = exports.helpers.merge;
try {
- js = (parser.parse(lexer.tokenize(code))).compile(options);
+ options.sm = new sourceMap.SourceMapGenerator({
+ file: path.basename(options.filename, path.extname(options.filename)) + '.js',
+ sourceRoot: ''
+ });
+ js = Object((parser.parse(lexer.tokenize(code))).compile(options));
+ js.sm = options.sm;
if (!options.header) return js;
} catch (err) {
if (options.filename) {
View
52 lib/coffee-script/command.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript 1.2.1-pre
(function() {
- var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, forkNode, fs, helpers, hidden, joinTimeout, lint, loadRequires, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, version, wait, watch, watchDir, watchers, writeJs, _ref;
+ var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, forkNode, fs, helpers, hidden, joinTimeout, lint, loadRequires, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, version, wait, watch, watchDir, watchers, writeJs, writeSourceMap, _ref;
fs = require('fs');
@@ -32,7 +32,7 @@
BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.';
- SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-r', '--require [FILE*]', 'require a library before executing your script'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];
+ SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-m', '--map', 'compile to JavaScript with source map and save as .js and .js.map files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-r', '--require [FILE*]', 'require a library before executing your script'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];
opts = {};
@@ -129,7 +129,7 @@
};
compileScript = function(file, input, base) {
- var o, options, t, task;
+ var o, options, output, sm, t, task;
o = opts;
options = compileOptions(file);
try {
@@ -152,11 +152,16 @@
t.output = CoffeeScript.compile(t.input, t.options);
CoffeeScript.emit('success', task);
if (o.print) {
- return printLine(t.output.trim());
+ return printLine(t.output.toString().trim());
+ } else if (o.map) {
+ sm = t.output.sm;
+ output = t.output.toString() + ("\n\/\/@ sourceMappingURL=" + (path.basename(t.file, path.extname(t.file))) + ".js.map");
+ writeSourceMap(t.file, sm, base);
+ return writeJs(t.file, output, base);
} else if (o.compile) {
- return writeJs(t.file, t.output, base);
+ return writeJs(t.file, t.output.toString(), base);
} else if (o.lint) {
- return lint(t.file, t.output);
+ return lint(t.file, t.output.toString());
}
}
} catch (err) {
@@ -331,9 +336,15 @@
}
};
- outputPath = function(source, base) {
+ outputPath = function(source, base, sm) {
var baseDir, dir, filename, srcDir;
- filename = path.basename(source, path.extname(source)) + '.js';
+ if (sm == null) sm = false;
+ filename = path.basename(source, path.extname(source));
+ if (sm) {
+ filename += '.js.map';
+ } else {
+ filename += '.js';
+ }
srcDir = path.dirname(source);
baseDir = base === '.' ? srcDir : srcDir.substring(base.length);
dir = opts.output ? path.join(opts.output, baseDir) : srcDir;
@@ -363,6 +374,29 @@
});
};
+ writeSourceMap = function(source, sourceMap, base) {
+ var compile, smDir, smPath;
+ smPath = outputPath(source, base, true);
+ smDir = path.dirname(smPath);
+ compile = function() {
+ if (sourceMap.length <= 0) sourceMap = ' ';
+ return fs.writeFile(smPath, sourceMap, function(err) {
+ if (err) {
+ return printLine(err.message);
+ } else if (opts.compile && opts.watch) {
+ return timeLog("compiled " + source);
+ }
+ });
+ };
+ return path.exists(smDir, function(exists) {
+ if (exists) {
+ return compile();
+ } else {
+ return exec("mkdir -p " + smDir, compile);
+ }
+ });
+ };
+
wait = function(milliseconds, func) {
return setTimeout(func, milliseconds);
};
@@ -404,7 +438,7 @@
optionParser = new optparse.OptionParser(SWITCHES, BANNER);
o = opts = optionParser.parse(process.argv.slice(2));
o.compile || (o.compile = !!o.output);
- o.run = !(o.compile || o.print || o.lint);
+ o.run = !(o.compile || o.map || o.print || o.lint);
o.print = !!(o.print || (o["eval"] || o.stdio && o.compile));
sources = o["arguments"];
for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) {
View
4 lib/coffee-script/grammar.js
@@ -11,7 +11,9 @@
patternString = patternString.replace(/\s{2,}/g, ' ');
if (!action) return [patternString, '$$ = $1;', options];
action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())";
- action = action.replace(/\bnew /g, '$&yy.');
+ action = action.replace(/\b(new )([a-zA-Z0-9_]+)(\(?)/g, (function(g0, g1, name, paren) {
+ return ["(function(q,w,e,r,t,y,u,i,o,p){", "var x = new yy." + name + "(q,w,e,r,t,y,u,i,o,p);", "x.lineno = yylineno;", "for(var i = 0, len=arguments.length; i < len; i++) {", "if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {", "x.lineno = arguments[i].lineno;", "}", "};", "return x;", "})" + (paren ? '(' : '()')].join('');
+ }));
action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&');
return [patternString, "$$ = " + action + ";", options];
};
View
27 lib/coffee-script/nodes.js
@@ -1,10 +1,12 @@
// Generated by CoffeeScript 1.2.1-pre
(function() {
- var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, starts, unfoldSoak, utility, _ref, _ref1,
+ var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, path, starts, unfoldSoak, utility, _ref, _ref1,
__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 = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+ path = require('path');
+
Scope = require('./scope').Scope;
_ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED;
@@ -273,10 +275,11 @@
};
Block.prototype.compileNode = function(o) {
- var code, codes, node, top, _i, _len, _ref2;
+ var code, codes, line, lines, node, top, _i, _j, _len, _len1, _ref2;
this.tab = o.indent;
top = o.level === LEVEL_TOP;
codes = [];
+ lines = [];
_ref2 = this.expressions;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
node = _ref2[_i];
@@ -295,6 +298,26 @@
} else {
codes.push(node.compile(o, LEVEL_LIST));
}
+ lines.push({
+ generated: 1,
+ original: node.lineno
+ });
+ }
+ for (_j = 0, _len1 = lines.length; _j < _len1; _j++) {
+ line = lines[_j];
+ if (line.original) {
+ o.sm.addMapping({
+ generated: {
+ line: line.generated,
+ column: 0
+ },
+ original: {
+ line: line.original,
+ column: 0
+ },
+ source: path.basename(o.filename)
+ });
+ }
}
if (top) {
if (this.spaced) {
View
216 lib/coffee-script/parser.js
@@ -9,7 +9,7 @@ performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
var $0 = $$.length - 1;
switch (yystate) {
-case 1:return this.$ = new yy.Block;
+case 1:return this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Block(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})();
break;
case 2:return this.$ = $$[$0];
break;
@@ -29,7 +29,7 @@ case 9:this.$ = $$[$0];
break;
case 10:this.$ = $$[$0];
break;
-case 11:this.$ = new yy.Literal($$[$0]);
+case 11:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
case 12:this.$ = $$[$0];
break;
@@ -55,44 +55,44 @@ case 22:this.$ = $$[$0];
break;
case 23:this.$ = $$[$0];
break;
-case 24:this.$ = new yy.Block;
+case 24:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Block(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})();
break;
case 25:this.$ = $$[$0-1];
break;
-case 26:this.$ = new yy.Literal($$[$0]);
+case 26:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 27:this.$ = new yy.Literal($$[$0]);
+case 27:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 28:this.$ = new yy.Literal($$[$0]);
+case 28:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
case 29:this.$ = $$[$0];
break;
-case 30:this.$ = new yy.Literal($$[$0]);
+case 30:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 31:this.$ = new yy.Literal($$[$0]);
+case 31:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 32:this.$ = new yy.Literal($$[$0]);
+case 32:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
case 33:this.$ = (function () {
var val;
- val = new yy.Literal($$[$0]);
+ val = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
if ($$[$0] === 'undefined') val.isUndefined = true;
return val;
}());
break;
-case 34:this.$ = new yy.Assign($$[$0-2], $$[$0]);
+case 34:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0]);
break;
-case 35:this.$ = new yy.Assign($$[$0-3], $$[$0]);
+case 35:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-3], $$[$0]);
break;
-case 36:this.$ = new yy.Assign($$[$0-4], $$[$0-1]);
+case 36:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-4], $$[$0-1]);
break;
-case 37:this.$ = new yy.Assign($$[$0-4], $$[$0-1], '.=');
+case 37:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-4], $$[$0-1], '.=');
break;
-case 38:this.$ = new yy.Value($$[$0]);
+case 38:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 39:this.$ = new yy.Assign(new yy.Value($$[$0-2]), $$[$0], 'object');
+case 39:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2]), $$[$0], 'object');
break;
-case 40:this.$ = new yy.Assign(new yy.Value($$[$0-4]), $$[$0-1], 'object');
+case 40:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-4]), $$[$0-1], 'object');
break;
case 41:this.$ = $$[$0];
break;
@@ -102,15 +102,15 @@ case 43:this.$ = $$[$0];
break;
case 44:this.$ = $$[$0];
break;
-case 45:this.$ = new yy.Return($$[$0]);
+case 45:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Return(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 46:this.$ = new yy.Return;
+case 46:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Return(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})();
break;
-case 47:this.$ = new yy.Comment($$[$0]);
+case 47:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Comment(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 48:this.$ = new yy.Code($$[$0-3], $$[$0], $$[$0-1]);
+case 48:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Code(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-3], $$[$0], $$[$0-1]);
break;
-case 49:this.$ = new yy.Code([], $$[$0], $$[$0-1]);
+case 49:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Code(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})([], $$[$0], $$[$0-1]);
break;
case 50:this.$ = 'func';
break;
@@ -126,11 +126,11 @@ case 55:this.$ = [$$[$0]];
break;
case 56:this.$ = $$[$0-2].concat($$[$0]);
break;
-case 57:this.$ = new yy.Param($$[$0]);
+case 57:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Param(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 58:this.$ = new yy.Param($$[$0-1], null, true);
+case 58:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Param(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], null, true);
break;
-case 59:this.$ = new yy.Param($$[$0-2], $$[$0]);
+case 59:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Param(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0]);
break;
case 60:this.$ = $$[$0];
break;
@@ -140,39 +140,39 @@ case 62:this.$ = $$[$0];
break;
case 63:this.$ = $$[$0];
break;
-case 64:this.$ = new yy.Splat($$[$0-1]);
+case 64:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Splat(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1]);
break;
-case 65:this.$ = new yy.Value($$[$0]);
+case 65:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
case 66:this.$ = $$[$0-1].add($$[$0]);
break;
-case 67:this.$ = new yy.Value($$[$0-1], [].concat($$[$0]));
+case 67:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], [].concat($$[$0]));
break;
case 68:this.$ = $$[$0];
break;
case 69:this.$ = $$[$0];
break;
-case 70:this.$ = new yy.Value($$[$0]);
+case 70:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 71:this.$ = new yy.Value($$[$0]);
+case 71:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
case 72:this.$ = $$[$0];
break;
-case 73:this.$ = new yy.Value($$[$0]);
+case 73:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 74:this.$ = new yy.Value($$[$0]);
+case 74:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 75:this.$ = new yy.Value($$[$0]);
+case 75:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
case 76:this.$ = $$[$0];
break;
-case 77:this.$ = new yy.Access($$[$0]);
+case 77:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Access(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 78:this.$ = new yy.Access($$[$0], 'soak');
+case 78:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Access(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0], 'soak');
break;
-case 79:this.$ = [new yy.Access(new yy.Literal('prototype')), new yy.Access($$[$0])];
+case 79:this.$ = [(function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Access(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('prototype')), (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Access(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0])];
break;
-case 80:this.$ = new yy.Access(new yy.Literal('prototype'));
+case 80:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Access(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('prototype'));
break;
case 81:this.$ = $$[$0];
break;
@@ -182,11 +182,11 @@ case 83:this.$ = yy.extend($$[$0], {
soak: true
});
break;
-case 84:this.$ = new yy.Index($$[$0]);
+case 84:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Index(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 85:this.$ = new yy.Slice($$[$0]);
+case 85:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Slice(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 86:this.$ = new yy.Obj($$[$0-2], $$[$0-3].generated);
+case 86:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Obj(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0-3].generated);
break;
case 87:this.$ = [];
break;
@@ -198,29 +198,29 @@ case 90:this.$ = $$[$0-3].concat($$[$0]);
break;
case 91:this.$ = $$[$0-5].concat($$[$0-2]);
break;
-case 92:this.$ = new yy.Class;
+case 92:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})();
break;
-case 93:this.$ = new yy.Class(null, null, $$[$0]);
+case 93:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})(null, null, $$[$0]);
break;
-case 94:this.$ = new yy.Class(null, $$[$0]);
+case 94:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})(null, $$[$0]);
break;
-case 95:this.$ = new yy.Class(null, $$[$0-1], $$[$0]);
+case 95:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})(null, $$[$0-1], $$[$0]);
break;
-case 96:this.$ = new yy.Class($$[$0]);
+case 96:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 97:this.$ = new yy.Class($$[$0-1], null, $$[$0]);
+case 97:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], null, $$[$0]);
break;
-case 98:this.$ = new yy.Class($$[$0-2], $$[$0]);
+case 98:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0]);
break;
-case 99:this.$ = new yy.Class($$[$0-3], $$[$0-1], $$[$0]);
+case 99:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Class(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-3], $$[$0-1], $$[$0]);
break;
-case 100:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]);
+case 100:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Call(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 101:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]);
+case 101:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Call(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 102:this.$ = new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]);
+case 102:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Call(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('super', [(function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Splat(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('arguments'))]);
break;
-case 103:this.$ = new yy.Call('super', $$[$0]);
+case 103:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Call(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('super', $$[$0]);
break;
case 104:this.$ = false;
break;
@@ -230,29 +230,29 @@ case 106:this.$ = [];
break;
case 107:this.$ = $$[$0-2];
break;
-case 108:this.$ = new yy.Value(new yy.Literal('this'));
+case 108:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('this'));
break;
-case 109:this.$ = new yy.Value(new yy.Literal('this'));
+case 109:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('this'));
break;
-case 110:this.$ = new yy.Value(new yy.Literal('this'), [new yy.Access($$[$0])], 'this');
+case 110:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('this'), [(function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Access(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0])], 'this');
break;
-case 111:this.$ = new yy.Arr([]);
+case 111:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Arr(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})([]);
break;
-case 112:this.$ = new yy.Arr($$[$0-2]);
+case 112:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Arr(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2]);
break;
case 113:this.$ = 'inclusive';
break;
case 114:this.$ = 'exclusive';
break;
-case 115:this.$ = new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]);
+case 115:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Range(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-3], $$[$0-1], $$[$0-2]);
break;
-case 116:this.$ = new yy.Range($$[$0-2], $$[$0], $$[$0-1]);
+case 116:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Range(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 117:this.$ = new yy.Range($$[$0-1], null, $$[$0]);
+case 117:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Range(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], null, $$[$0]);
break;
-case 118:this.$ = new yy.Range(null, $$[$0], $$[$0-1]);
+case 118:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Range(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})(null, $$[$0], $$[$0-1]);
break;
-case 119:this.$ = new yy.Range(null, null, $$[$0]);
+case 119:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Range(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})(null, null, $$[$0]);
break;
case 120:this.$ = [$$[$0]];
break;
@@ -272,33 +272,33 @@ case 127:this.$ = $$[$0];
break;
case 128:this.$ = [].concat($$[$0-2], $$[$0]);
break;
-case 129:this.$ = new yy.Try($$[$0]);
+case 129:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Try(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 130:this.$ = new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]);
+case 130:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Try(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0][0], $$[$0][1]);
break;
-case 131:this.$ = new yy.Try($$[$0-2], null, null, $$[$0]);
+case 131:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Try(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], null, null, $$[$0]);
break;
-case 132:this.$ = new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]);
+case 132:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Try(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]);
break;
case 133:this.$ = [$$[$0-1], $$[$0]];
break;
-case 134:this.$ = new yy.Throw($$[$0]);
+case 134:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Throw(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 135:this.$ = new yy.Parens($$[$0-1]);
+case 135:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Parens(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1]);
break;
-case 136:this.$ = new yy.Parens($$[$0-2]);
+case 136:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Parens(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2]);
break;
-case 137:this.$ = new yy.While($$[$0]);
+case 137:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.While(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 138:this.$ = new yy.While($$[$0-2], {
+case 138:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.While(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], {
guard: $$[$0]
});
break;
-case 139:this.$ = new yy.While($$[$0], {
+case 139:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.While(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0], {
invert: true
});
break;
-case 140:this.$ = new yy.While($$[$0-2], {
+case 140:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.While(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], {
invert: true,
guard: $$[$0]
});
@@ -311,18 +311,18 @@ case 143:this.$ = $$[$0].addBody(yy.Block.wrap([$$[$0-1]]));
break;
case 144:this.$ = $$[$0];
break;
-case 145:this.$ = new yy.While(new yy.Literal('true')).addBody($$[$0]);
+case 145:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.While(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('true')).addBody($$[$0]);
break;
-case 146:this.$ = new yy.While(new yy.Literal('true')).addBody(yy.Block.wrap([$$[$0]]));
+case 146:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.While(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Literal(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('true')).addBody(yy.Block.wrap([$$[$0]]));
break;
-case 147:this.$ = new yy.For($$[$0-1], $$[$0]);
+case 147:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.For(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0]);
break;
-case 148:this.$ = new yy.For($$[$0-1], $$[$0]);
+case 148:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.For(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0]);
break;
-case 149:this.$ = new yy.For($$[$0], $$[$0-1]);
+case 149:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.For(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0], $$[$0-1]);
break;
case 150:this.$ = {
- source: new yy.Value($$[$0])
+ source: (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0])
};
break;
case 151:this.$ = (function () {
@@ -341,9 +341,9 @@ case 153:this.$ = (function () {
break;
case 154:this.$ = $$[$0];
break;
-case 155:this.$ = new yy.Value($$[$0]);
+case 155:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
-case 156:this.$ = new yy.Value($$[$0]);
+case 156:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Value(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0]);
break;
case 157:this.$ = [$$[$0]];
break;
@@ -386,13 +386,13 @@ case 165:this.$ = {
guard: $$[$0]
};
break;
-case 166:this.$ = new yy.Switch($$[$0-3], $$[$0-1]);
+case 166:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Switch(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-3], $$[$0-1]);
break;
-case 167:this.$ = new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]);
+case 167:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Switch(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-5], $$[$0-3], $$[$0-1]);
break;
-case 168:this.$ = new yy.Switch(null, $$[$0-1]);
+case 168:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Switch(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})(null, $$[$0-1]);
break;
-case 169:this.$ = new yy.Switch(null, $$[$0-3], $$[$0-1]);
+case 169:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Switch(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})(null, $$[$0-3], $$[$0-1]);
break;
case 170:this.$ = $$[$0];
break;
@@ -402,69 +402,69 @@ case 172:this.$ = [[$$[$0-1], $$[$0]]];
break;
case 173:this.$ = [[$$[$0-2], $$[$0-1]]];
break;
-case 174:this.$ = new yy.If($$[$0-1], $$[$0], {
+case 174:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.If(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0], {
type: $$[$0-2]
});
break;
-case 175:this.$ = $$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], {
+case 175:this.$ = $$[$0-4].addElse((function(q,w,e,r,t,y,u,i,o,p){var x = new yy.If(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0], {
type: $$[$0-2]
}));
break;
case 176:this.$ = $$[$0];
break;
case 177:this.$ = $$[$0-2].addElse($$[$0]);
break;
-case 178:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), {
+case 178:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.If(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0], yy.Block.wrap([$$[$0-2]]), {
type: $$[$0-1],
statement: true
});
break;
-case 179:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), {
+case 179:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.If(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0], yy.Block.wrap([$$[$0-2]]), {
type: $$[$0-1],
statement: true
});
break;
-case 180:this.$ = new yy.Op($$[$0-1], $$[$0]);
+case 180:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0]);
break;
-case 181:this.$ = new yy.Op('-', $$[$0]);
+case 181:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('-', $$[$0]);
break;
-case 182:this.$ = new yy.Op('+', $$[$0]);
+case 182:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('+', $$[$0]);
break;
-case 183:this.$ = new yy.Op('--', $$[$0]);
+case 183:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('--', $$[$0]);
break;
-case 184:this.$ = new yy.Op('++', $$[$0]);
+case 184:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('++', $$[$0]);
break;
-case 185:this.$ = new yy.Op('--', $$[$0-1], null, true);
+case 185:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('--', $$[$0-1], null, true);
break;
-case 186:this.$ = new yy.Op('++', $$[$0-1], null, true);
+case 186:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('++', $$[$0-1], null, true);
break;
-case 187:this.$ = new yy.Existence($$[$0-1]);
+case 187:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Existence(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1]);
break;
-case 188:this.$ = new yy.Op('+', $$[$0-2], $$[$0]);
+case 188:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('+', $$[$0-2], $$[$0]);
break;
-case 189:this.$ = new yy.Op('-', $$[$0-2], $$[$0]);
+case 189:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})('-', $$[$0-2], $$[$0]);
break;
-case 190:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 190:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0-2], $$[$0]);
break;
-case 191:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 191:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0-2], $$[$0]);
break;
-case 192:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 192:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0-2], $$[$0]);
break;
-case 193:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 193:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0-2], $$[$0]);
break;
case 194:this.$ = (function () {
if ($$[$0-1].charAt(0) === '!') {
- return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
+ return (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
} else {
- return new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+ return (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Op(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-1], $$[$0-2], $$[$0]);
}
}());
break;
-case 195:this.$ = new yy.Assign($$[$0-2], $$[$0], $$[$0-1]);
+case 195:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 196:this.$ = new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]);
+case 196:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Assign(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-4], $$[$0-1], $$[$0-3]);
break;
-case 197:this.$ = new yy.Extends($$[$0-2], $$[$0]);
+case 197:this.$ = (function(q,w,e,r,t,y,u,i,o,p){var x = new yy.Extends(q,w,e,r,t,y,u,i,o,p);x.lineno = yylineno;for(var i = 0, len=arguments.length; i < len; i++) {if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {x.lineno = arguments[i].lineno;}};return x;})($$[$0-2], $$[$0]);
break;
}
},
View
50 package.json
@@ -1,31 +1,39 @@
{
- "name": "coffee-script",
- "description": "Unfancy JavaScript",
- "keywords": ["javascript", "language", "coffeescript", "compiler"],
- "author": "Jeremy Ashkenas",
- "version": "1.2.1-pre",
- "licenses": [{
- "type": "MIT",
- "url": "http://github.com/jashkenas/coffee-script/raw/master/LICENSE"
- }],
- "engines": {
- "node": ">=0.4.0"
+ "name": "coffee-script",
+ "description": "Unfancy JavaScript",
+ "keywords": [
+ "javascript",
+ "language",
+ "coffeescript",
+ "compiler"
+ ],
+ "author": "Jeremy Ashkenas",
+ "version": "1.2.1-pre",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/jashkenas/coffee-script/raw/master/LICENSE"
+ }
+ ],
+ "engines": {
+ "node": ">=0.4.0"
},
- "directories" : {
- "lib" : "./lib/coffee-script"
+ "directories": {
+ "lib": "./lib/coffee-script"
},
- "main" : "./lib/coffee-script/coffee-script",
- "bin": {
- "coffee": "./bin/coffee",
- "cake": "./bin/cake"
+ "main": "./lib/coffee-script/coffee-script",
+ "bin": {
+ "coffee": "./bin/coffee",
+ "cake": "./bin/cake"
},
- "homepage": "http://coffeescript.org",
- "repository": {
+ "homepage": "http://coffeescript.org",
+ "repository": {
"type": "git",
"url": "git://github.com/jashkenas/coffee-script.git"
},
"devDependencies": {
- "uglify-js": ">=1.0.0",
- "jison": ">=0.2.0"
+ "uglify-js": ">=1.0.0",
+ "jison": ">=0.2.0",
+ "source-map": "~0.1.0"
}
}
View
4 src/browser.coffee
@@ -6,12 +6,12 @@ CoffeeScript.require = require
# Use standard JavaScript `eval` to eval code.
CoffeeScript.eval = (code, options = {}) ->
options.bare ?= on
- eval CoffeeScript.compile code, options
+ eval (CoffeeScript.compile code, options).toString()
# Running code does not provide access to this scope.
CoffeeScript.run = (code, options = {}) ->
options.bare = on
- Function(CoffeeScript.compile code, options)()
+ Function((CoffeeScript.compile code, options).toString())()
# If we're not in a browser environment, we're finished with the public API.
return unless window?
View
8 src/coffee-script.coffee
@@ -8,6 +8,7 @@
fs = require 'fs'
path = require 'path'
+sourceMap = require 'source-map'
{Lexer,RESERVED} = require './lexer'
{parser} = require './parser'
vm = require 'vm'
@@ -34,7 +35,12 @@ exports.helpers = require './helpers'
exports.compile = compile = (code, options = {}) ->
{merge} = exports.helpers
try
- js = (parser.parse lexer.tokenize code).compile options
+ options.sm = new sourceMap.SourceMapGenerator(
+ file: path.basename(options.filename, path.extname(options.filename)) + '.js'
+ sourceRoot: ''
+ )
+ js = Object((parser.parse lexer.tokenize code).compile options)
+ js.sm = options.sm;
return js unless options.header
catch err
err.message = "In #{options.filename}, #{err.message}" if options.filename
View
35 src/command.coffee
@@ -32,6 +32,7 @@ BANNER = '''
SWITCHES = [
['-b', '--bare', 'compile without a top-level function wrapper']
['-c', '--compile', 'compile to JavaScript and save as .js files']
+ ['-m', '--map', 'compile to JavaScript with source map and save as .js and .js.map files']
['-e', '--eval', 'pass a string from the command line as input']
['-h', '--help', 'display this help message']
['-i', '--interactive', 'run an interactive CoffeeScript REPL']
@@ -131,9 +132,14 @@ compileScript = (file, input, base) ->
else
t.output = CoffeeScript.compile t.input, t.options
CoffeeScript.emit 'success', task
- if o.print then printLine t.output.trim()
- else if o.compile then writeJs t.file, t.output, base
- else if o.lint then lint t.file, t.output
+ if o.print then printLine t.output.toString().trim()
+ else if o.map
+ sm = t.output.sm;
+ output = t.output.toString() + "\n\/\/@ sourceMappingURL=#{path.basename(t.file, path.extname(t.file))}.js.map"
+ writeSourceMap t.file, sm, base
+ writeJs t.file, output, base
+ else if o.compile then writeJs t.file, t.output.toString(), base
+ else if o.lint then lint t.file, t.output.toString()
catch err
CoffeeScript.emit 'failure', err, task
return if CoffeeScript.listeners('failure').length
@@ -253,8 +259,12 @@ removeSource = (source, base, removeJs) ->
timeLog "removed #{source}"
# Get the corresponding output JavaScript path for a source file.
-outputPath = (source, base) ->
- filename = path.basename(source, path.extname(source)) + '.js'
+outputPath = (source, base, sm = false) ->
+ filename = path.basename(source, path.extname(source))
+ if sm
+ filename += '.js.map'
+ else
+ filename += '.js'
srcDir = path.dirname source
baseDir = if base is '.' then srcDir else srcDir.substring base.length
dir = if opts.output then path.join opts.output, baseDir else srcDir
@@ -276,6 +286,19 @@ writeJs = (source, js, base) ->
path.exists jsDir, (exists) ->
if exists then compile() else exec "mkdir -p #{jsDir}", compile
+writeSourceMap = (source, sourceMap, base) ->
+ smPath = outputPath source, base, true
+ smDir = path.dirname smPath
+ compile = ->
+ sourceMap = ' ' if sourceMap.length <= 0
+ fs.writeFile smPath, sourceMap, (err) ->
+ if err
+ printLine err.message
+ else if opts.compile and opts.watch
+ timeLog "compiled #{source}"
+ path.exists smDir, (exists) ->
+ if exists then compile() else exec "mkdir -p #{smDir}", compile
+
# Convenience for cleaner setTimeouts.
wait = (milliseconds, func) -> setTimeout func, milliseconds
@@ -307,7 +330,7 @@ parseOptions = ->
optionParser = new optparse.OptionParser SWITCHES, BANNER
o = opts = optionParser.parse process.argv[2..]
o.compile or= !!o.output
- o.run = not (o.compile or o.print or o.lint)
+ o.run = not (o.compile or o.map or o.print or o.lint)
o.print = !! (o.print or (o.eval or o.stdio and o.compile))
sources = o.arguments
sourceCode[i] = null for source, i in sources
View
21 src/grammar.coffee
@@ -34,7 +34,26 @@ o = (patternString, action, options) ->
patternString = patternString.replace /\s{2,}/g, ' '
return [patternString, '$$ = $1;', options] unless action
action = if match = unwrap.exec action then match[1] else "(#{action}())"
- action = action.replace /\bnew /g, '$&yy.'
+
+ # action = action.replace /\bnew /g, '$&yy.'
+
+ # Store line numbers (https://github.com/jashkenas/coffee-script/pull/955)
+ action = action.replace(
+ /\b(new )([a-zA-Z0-9_]+)(\(?)/g,
+ ((g0, g1, name, paren) -> [
+ "(function(q,w,e,r,t,y,u,i,o,p){"
+ "var x = new yy.#{name}(q,w,e,r,t,y,u,i,o,p);"
+ "x.lineno = yylineno;"
+ # If any of our kids has a lower lineno, use that
+ "for(var i = 0, len=arguments.length; i < len; i++) {"
+ "if (arguments[i] && arguments[i].lineno && arguments[i].lineno < x.lineno) {"
+ "x.lineno = arguments[i].lineno;"
+ "}"
+ "};"
+ "return x;"
+ "})" + if paren then '(' else '()'
+ ].join('')))
+
action = action.replace /\b(?:Block\.wrap|extend)\b/g, 'yy.$&'
[patternString, "$$ = #{action};", options]
View
14 src/nodes.coffee
@@ -3,6 +3,7 @@
# but some are created by other nodes as a method of code generation. To convert
# the syntax tree into a string of JavaScript code, call `compile()` on the root.
+path = require 'path'
{Scope} = require './scope'
{RESERVED, STRICT_PROSCRIBED} = require './lexer'
@@ -216,6 +217,7 @@ exports.Block = class Block extends Base
@tab = o.indent
top = o.level is LEVEL_TOP
codes = []
+ lines = []
for node in @expressions
node = node.unwrapAll()
node = (node.unfoldSoak(o) or node)
@@ -233,6 +235,18 @@ exports.Block = class Block extends Base
codes.push code
else
codes.push node.compile o, LEVEL_LIST
+ lines.push
+ generated: 1
+ original: node.lineno
+ for line in lines when line.original
+ o.sm.addMapping
+ generated:
+ line: line.generated
+ column: 0
+ original:
+ line: line.original
+ column: 0
+ source: path.basename o.filename
if top
if @spaced
return "\n#{codes.join '\n\n'}\n"
View
10 test/compilation.coffee
@@ -3,23 +3,23 @@
# helper to assert that a string should fail compilation
cantCompile = (code) ->
- throws -> CoffeeScript.compile code
+ throws -> (CoffeeScript.compile code).toString()
test "ensure that carriage returns don't break compilation on Windows", ->
- doesNotThrow -> CoffeeScript.compile 'one\r\ntwo', bare: on
+ doesNotThrow -> (CoffeeScript.compile 'one\r\ntwo', bare: on).toString()
test "--bare", ->
eq -1, CoffeeScript.compile('x = y', bare: on).indexOf 'function'
ok 'passed' is CoffeeScript.eval '"passed"', bare: on, filename: 'test'
test "header (#1778)", ->
header = "// Generated by CoffeeScript #{CoffeeScript.VERSION}\n"
- eq 0, CoffeeScript.compile('x = y', header: on).indexOf header
+ eq 0, CoffeeScript.compile('x = y', header: on).toString().indexOf header
test "header is disabled by default", ->
header = "// Generated by CoffeeScript #{CoffeeScript.VERSION}\n"
- eq -1, CoffeeScript.compile('x = y').indexOf header
+ eq -1, CoffeeScript.compile('x = y').toString().indexOf header
test "multiple generated references", ->
a = {b: []}
@@ -69,4 +69,4 @@ test "#1106: __proto__ compilation", ->
ok __proto__
test "reference named hasOwnProperty", ->
- CoffeeScript.compile 'hasOwnProperty = 0; a = 1'
+ (CoffeeScript.compile 'hasOwnProperty = 0; a = 1').toString()
View
4 test/strict.coffee
@@ -18,9 +18,9 @@
# helper to assert that code complies with strict prohibitions
strict = (code, msg) ->
- throws (-> CoffeeScript.compile code), null, msg
+ throws (-> (CoffeeScript.compile code).toString()), null, msg
strictOk = (code, msg) ->
- doesNotThrow (-> CoffeeScript.compile code), msg
+ doesNotThrow (-> (CoffeeScript.compile code).toString()), msg
test "octal integer literals prohibited", ->

0 comments on commit 4d5a352

Please sign in to comment.
Something went wrong with that request. Please try again.