Update browser compiler for 1.12.3
This commit is contained in:
parent
729127735b
commit
45d0a7d01f
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* CoffeeScript Compiler v1.12.2
|
||||
* CoffeeScript Compiler v1.12.3
|
||||
* http://coffeescript.org
|
||||
*
|
||||
* Copyright 2011, Jeremy Ashkenas
|
||||
|
@ -13,8 +13,8 @@ $jscomp.polyfill("Array.prototype.find",function(u){return u?u:function(u,qa){re
|
|||
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var u=$jscomp.global.Symbol.iterator;u||(u=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[u]&&$jscomp.defineProperty(Array.prototype,u,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
|
||||
$jscomp.arrayIterator=function(u){var ya=0;return $jscomp.iteratorPrototype(function(){return ya<u.length?{done:!1,value:u[ya++]}:{done:!0}})};$jscomp.iteratorPrototype=function(u){$jscomp.initSymbolIterator();u={next:u};u[$jscomp.global.Symbol.iterator]=function(){return this};return u};$jscomp.array=$jscomp.array||{};
|
||||
$jscomp.iteratorFromArray=function(u,ya){$jscomp.initSymbolIterator();u instanceof String&&(u+="");var qa=0,g={next:function(){if(qa<u.length){var ua=qa++;return{value:ya(ua,u[ua]),done:!1}}g.next=function(){return{done:!0,value:void 0}};return g.next()}};g[Symbol.iterator]=function(){return g};return g};$jscomp.polyfill("Array.prototype.keys",function(u){return u?u:function(){return $jscomp.iteratorFromArray(this,function(u){return u})}},"es6-impl","es3");
|
||||
(function(u){var ya=function(){function u(g){return u[g]}u["../../package.json"]={name:"coffee-script",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"1.12.2",license:"MIT",engines:{node:"\x3e\x3d0.8.0"},directories:{lib:"./lib/coffee-script"},main:"./lib/coffee-script/coffee-script",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],preferGlobal:!0,scripts:{test:"node ./bin/cake test",
|
||||
"test-harmony":"node --harmony ./bin/cake test"},homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{docco:"~0.7.0","google-closure-compiler-js":"^20161201.0.0","highlight.js":"~9.9.0",jison:"\x3e\x3d0.4.17",marked:"^0.3.6",underscore:"~1.8.3"}};u["./helpers"]=function(){var g={};(function(){var u,xa,q,a,c,Ca;g.starts=function(a,c,l){return c===a.substr(l,c.length)};g.ends=
|
||||
(function(u){var ya=function(){function u(g){return u[g]}u["../../package.json"]={name:"coffee-script",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"1.12.3",license:"MIT",engines:{node:"\x3e\x3d0.8.0"},directories:{lib:"./lib/coffee-script"},main:"./lib/coffee-script/coffee-script",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],preferGlobal:!0,scripts:{test:"node ./bin/cake test",
|
||||
"test-harmony":"node --harmony ./bin/cake test"},homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{docco:"~0.7.0","google-closure-compiler-js":"^20161201.0.1","highlight.js":"~9.9.0",jison:"\x3e\x3d0.4.17",marked:"^0.3.6",underscore:"~1.8.3"}};u["./helpers"]=function(){var g={};(function(){var u,xa,q,a,c,Ca;g.starts=function(a,c,l){return c===a.substr(l,c.length)};g.ends=
|
||||
function(a,c,l){var f;f=c.length;return c===a.substr(a.length-f-(l||0),f)};g.repeat=c=function(a,c){var f;for(f="";0<c;)c&1&&(f+=a),c>>>=1,a+=a;return f};g.compact=function(a){var f,c,g,q;q=[];f=0;for(g=a.length;f<g;f++)(c=a[f])&&q.push(c);return q};g.count=function(a,c){var f,D;f=D=0;if(!c.length)return 1/0;for(;D=1+a.indexOf(c,D);)f++;return f};g.merge=function(a,c){return xa(xa({},a),c)};xa=g.extend=function(a,c){var f,D;for(f in c)D=c[f],a[f]=D;return a};g.flatten=q=function(a){var f,c,g,G;c=
|
||||
[];g=0;for(G=a.length;g<G;g++)f=a[g],"[object Array]"===Object.prototype.toString.call(f)?c=c.concat(q(f)):c.push(f);return c};g.del=function(a,c){var f;f=a[c];delete a[c];return f};g.some=null!=(a=Array.prototype.some)?a:function(a){var f,c,g;c=0;for(g=this.length;c<g;c++)if(f=this[c],a(f))return!0;return!1};g.invertLiterate=function(a){var f;f=!0;var c,g,q,F;q=a.split("\n");F=[];c=0;for(g=q.length;c<g;c++)a=q[c],f&&/^([ ]{4}|[ ]{0,3}\t)/.test(a)?F.push(a):(f=/^\s*$/.test(a))?F.push(a):F.push("# "+
|
||||
a);return F.join("\n")};u=function(a,c){return c?{first_line:a.first_line,first_column:a.first_column,last_line:c.last_line,last_column:c.last_column}:a};g.addLocationDataFn=function(a,c){return function(f){"object"===typeof f&&f.updateLocationDataIfMissing&&f.updateLocationDataIfMissing(u(a,c));return f}};g.locationDataToString=function(a){var f;"2"in a&&"first_line"in a[2]?f=a[2]:"first_line"in a&&(f=a);return f?f.first_line+1+":"+(f.first_column+1)+"-"+(f.last_line+1+":"+(f.last_column+1)):"No location data"};
|
||||
|
@ -244,7 +244,7 @@ k={},Ka;for(Ka in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ka)&&(k[K
|
|||
typeof t&&(t=this.symbols_[t]||t);l=n[Ia]&&n[Ia][t]}if("undefined"===typeof l||!l.length||!l[0]){var wa;q=[];for(y in n[Ia])this.terminals_[y]&&2<y&&q.push("'"+this.terminals_[y]+"'");wa=va.showPosition?"Parse error on line "+(c+1)+":\n"+va.showPosition()+"\nExpecting "+q.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'");this.parseError(wa,{text:va.match,token:this.terminals_[t]||t,line:va.yylineno,loc:Ka,
|
||||
expected:q})}if(l[0]instanceof Array&&1<l.length)throw Error("Parse Error: multiple actions possible at state: "+Ia+", token: "+t);switch(l[0]){case 1:b.push(t);d.push(va.yytext);e.push(va.yylloc);b.push(l[1]);t=null;p?(t=p,p=null):(f=va.yyleng,na=va.yytext,c=va.yylineno,Ka=va.yylloc,0<h&&h--);break;case 2:q=this.productions_[l[1]][1];r.$=d[d.length-q];r._$={first_line:e[e.length-(q||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(q||1)].first_column,last_column:e[e.length-
|
||||
1].last_column};m&&(r._$.range=[e[e.length-(q||1)].range[0],e[e.length-1].range[1]]);Ia=this.performAction.apply(r,[na,f,c,k,l[1],d,e].concat(g));if("undefined"!==typeof Ia)return Ia;q&&(b=b.slice(0,-2*q),d=d.slice(0,-1*q),e=e.slice(0,-1*q));b.push(this.productions_[l[1]][0]);d.push(r.$);e.push(r._$);l=n[b[b.length-2]][b[b.length-1]];b.push(l);break;case 3:return!0}}}};g.prototype=gc;gc.Parser=g;return new g}();"undefined"!==typeof u&&"undefined"!==typeof g&&(g.parser=xa,g.Parser=xa.Parser,g.parse=
|
||||
function(){return xa.parse.apply(xa,arguments)},g.main=function(q){q[1]||(console.log("Usage: "+q[0]+" FILE"),process.exit(1));var a=null,c=u("fs");"undefined"!==typeof c&&null!==c&&(a=c.readFileSync(u("path").normalize(q[1]),"utf8"));return g.parser.parse(a)},"undefined"!==typeof ua&&u.main===ua&&g.main(process.argv.slice(1)));return ua.exports}();u["./scope"]=function(){var g={};(function(){var u=[].indexOf||function(g){for(var q=0,a=this.length;q<a;q++)if(q in this&&this[q]===g)return q;return-1};
|
||||
function(){return xa.parse.apply(xa,arguments)},g.main=function(q){q[1]||(console.log("Usage: "+q[0]+" FILE"),process.exit(1));var a="",c=u("fs");"undefined"!==typeof c&&null!==c&&(a=c.readFileSync(u("path").normalize(q[1]),"utf8"));return g.parser.parse(a)},"undefined"!==typeof ua&&u.main===ua&&g.main(process.argv.slice(1)));return ua.exports}();u["./scope"]=function(){var g={};(function(){var u=[].indexOf||function(g){for(var q=0,a=this.length;q<a;q++)if(q in this&&this[q]===g)return q;return-1};
|
||||
g.Scope=function(){function g(g,a,c,u){var f,q;this.parent=g;this.expressions=a;this.method=c;this.referencedVars=u;this.variables=[{name:"arguments",type:"arguments"}];this.positions={};this.parent||(this.utilities={});this.root=null!=(f=null!=(q=this.parent)?q.root:void 0)?f:this}g.prototype.add=function(g,a,c){return this.shared&&!c?this.parent.add(g,a,c):Object.prototype.hasOwnProperty.call(this.positions,g)?this.variables[this.positions[g]].type=a:this.positions[g]=this.variables.push({name:g,
|
||||
type:a})-1};g.prototype.namedMethod=function(){var g;return null!=(g=this.method)&&g.name||!this.parent?this.method:this.parent.namedMethod()};g.prototype.find=function(g){if(this.check(g))return!0;this.add(g,"var");return!1};g.prototype.parameter=function(g){if(!this.shared||!this.parent.check(g,!0))return this.add(g,"param")};g.prototype.check=function(g){var a;return!!(this.type(g)||null!=(a=this.parent)&&a.check(g))};g.prototype.temporary=function(g,a,c){null==c&&(c=!1);return c?(c=g.charCodeAt(0),
|
||||
g=122-c,c=String.fromCharCode(c+a%(g+1)),a=Math.floor(a/(g+1)),""+c+(a||"")):""+g+(a||"")};g.prototype.type=function(g){var a,c,q,f;q=this.variables;a=0;for(c=q.length;a<c;a++)if(f=q[a],f.name===g)return f.type;return null};g.prototype.freeVariable=function(g,a){var c,q,f;null==a&&(a={});for(c=0;;){f=this.temporary(g,c,a.single);if(!(this.check(f)||0<=u.call(this.root.referencedVars,f)))break;c++}(null!=(q=a.reserve)?q:1)&&this.add(f,"var",!0);return f};g.prototype.assign=function(g,a){this.add(g,
|
||||
|
|
Loading…
Reference in New Issue