@Override public Generator Out(final String _location, Generator expressionGen) { return expressionGen.Bind( new JSGenFunction<AstNode>() { public AstNode Generate( String in, String out, Function<AstNode, AstNode> returnFunction, AstNode expression) { return new Assignment( Token.ASSIGN, new PropertyGet(JSUtil.genName(out), JSUtil.genName(_location)), expression, 0); } }); }
@Override public Generator DynamicCall( Generator targetGen, final String _method, final List<Generator> _argGens) { return targetGen.Bind( new Function<AstNode, Generator>() { public Generator call(AstNode target) { if (JSUtil.isEmpty(target)) { return Monad.SequenceBind( _argGens, new Function<List<AstNode>, Generator>() { public Generator call(List<AstNode> args) { return new DynamicCallGenerator( _method, args, batchFunctionsInfo.get(_method)); } }); } else { return JSUtil.noimpl(); } } }); }