This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var src = 'var a, b, l = {a, [b]: {l}} = ({A}=a) => a = ({B=b}) => b = ({L=l}=40) => l'; | |
// parse it | |
var syntaxNode = new Parser(src).parseProgram(); | |
// transform what was parsed | |
var transformer = new Transformer(); | |
transformer.renamer = renamer_minify; | |
var transformedNode = transformer.tr(syntaxNode, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function w(){this.state=null;this.c={};this.result={value:null,pending:false};} | |
w.prototype.toState=function(state,result){this.state=state;if(this.c[state]){var l=this;setTimeout(function(){l.c[state](result)}, 0);}else{this.result.value=result;this.result.pending=12;}} | |
w.prototype.onState = function(state,c){this.state=state;if(this.result.pending)this.toState(state,this.result.value ) ; } | |
function w5sec() { | |
var l = new w(); | |
setTimeout(function(){l.toState("resolve",12);} , 5000) | |
return l | |
} |