Lines Matching refs:_emitLine

65   _proto._emitLine = function _emitLine(code) {  function
74 return _this._emitLine(line);
80 this._emitLine("function " + name + "(env, context, frame, runtime, cb) {");
81 this._emitLine("var lineno = " + node.lineno + ";");
82 this._emitLine("var colno = " + node.colno + ";");
83 this._emitLine("var " + this.buffer + " = \"\";");
84 this._emitLine('try {');
88 this._emitLine('cb(null, ' + this.buffer + ');');
91 this._emitLine('} catch (e) {');
92 this._emitLine(' cb(runtime.handleError(e, lineno, colno));');
93 this._emitLine('}');
94 this._emitLine('}');
101 this._emitLine(this._scopeClosers + ';');
192 _this4._emitLine('function(cb) {');
193 _this4._emitLine('if(!cb) { cb = function(err) { if(err) { throw err; }}}');
197 _this4._emitLine("cb(null, " + id + ");");
200 _this4._emitLine("return " + id + ";");
201 _this4._emitLine('}');
209 this._emitLine(', ' + this._makeCallback(res));
210 …this._emitLine(this.buffer + " += runtime.suppressValue(" + res + ", " + autoescape + " && env.opt…
421 this._emitLine(', ' + this._makeCallback(symbol));
443 _this6._emitLine('var ' + id + ';');
450 this._emitLine(';');
454 this._emitLine(';');
462 _this6._emitLine("frame.set(\"" + name + "\", " + id + ", true);");
463 _this6._emitLine('if(frame.topLevel) {');
464 _this6._emitLine("context.setVariable(\"" + name + "\", " + id + ");");
465 _this6._emitLine('}');
467 _this6._emitLine('if(frame.topLevel) {');
468 _this6._emitLine("context.addExport(\"" + name + "\", " + id + ");");
469 _this6._emitLine('}');
485 _this7._emitLine('break;');
498 this._emitLine(') {');
506 this._emitLine('}\nelse {');
514 this._emitLine('}\nelse {');
517 this._emitLine('}');
550 _this9._emitLine("frame.set(\"loop." + b.name + "\", " + b.val + ");");
563 this._emitLine('frame = frame.push();');
566 this._emitLine(';');
568 this._emitLine(arr + ' = runtime.fromIterator(' + arr + ');');
573 this._emitLine("var " + i + ";");
578 this._emitLine("if(runtime.isArray(" + arr + ")) {");
579 this._emitLine("var " + len + " = " + arr + ".length;");
580 this._emitLine("for(" + i + "=0; " + i + " < " + arr + ".length; " + i + "++) {");
585 _this10._emitLine("var " + tid + " = " + arr + "[" + i + "][" + u + "];");
586 _this10._emitLine("frame.set(\"" + child + "\", " + arr + "[" + i + "][" + u + "]);");
593 this._emitLine('}');
594 this._emitLine('} else {');
603 this._emitLine(i + " = -1;");
604 this._emitLine("var " + len + " = runtime.keys(" + arr + ").length;");
605 this._emitLine("for(var " + k + " in " + arr + ") {");
606 this._emitLine(i + "++;");
607 this._emitLine("var " + v + " = " + arr + "[" + k + "];");
608 this._emitLine("frame.set(\"" + key.value + "\", " + k + ");");
609 this._emitLine("frame.set(\"" + val.value + "\", " + v + ");");
614 this._emitLine('}');
615 this._emitLine('}');
620 this._emitLine("var " + len + " = " + arr + ".length;");
621 this._emitLine("for(var " + i + "=0; " + i + " < " + arr + ".length; " + i + "++) {");
622 this._emitLine("var " + _v + " = " + arr + "[" + i + "];");
623 this._emitLine("frame.set(\"" + node.name.value + "\", " + _v + ");");
628 this._emitLine('}');
630 this._emitLine('}');
632 this._emitLine('if (!' + len + ') {');
634 this._emitLine('}');
636 this._emitLine('frame = frame.pop();');
649 this._emitLine('frame = frame.push();');
652 this._emitLine(');');
663 _this11._emitLine("frame.set(\"" + id + "\", " + id + ");");
667 …this._emitLine("runtime." + asyncMethod + "(" + arr + ", 1, function(" + id + ", " + i + ", " + le…
668 this._emitLine('frame.set("' + id + '", ' + id + ');');
678 _this11._emitLine('next(' + i + (buf ? ',' + buf : '') + ');');
684 this._emitLine('}, ' + this._makeCallback(output));
687 this._emitLine(this.buffer + ' += ' + output + ';');
690 this._emitLine('if (!' + arr + '.length) {');
692 this._emitLine('}');
694 this._emitLine('frame = frame.pop();');
746 _this12._emitLine("frame.set(\"" + arg.value + "\", l_" + arg.value + ");");
765 this._emitLine('frame = ' + (keepFrame ? 'frame.pop();' : 'callerFrame;'));
766 this._emitLine("return new runtime.SafeString(" + bufferId + ");");
767 this._emitLine('});');
778 this._emitLine("frame.set(\"" + name + "\", " + funcId + ");");
781 this._emitLine("context.addExport(\"" + name + "\");");
783 this._emitLine("context.setVariable(\"" + name + "\", " + funcId + ");");
800 … this._emitLine(", " + eagerCompileArg + ", " + parentName + ", " + ignoreMissingArg + ", " + cb);
807 …this._emitLine(id + '.getExported(' + (node.withContext ? 'context.getVariables(), frame, ' : '') …
811 this._emitLine("frame.set(\"" + target + "\", " + id + ");");
813 this._emitLine("context.setVariable(\"" + target + "\", " + id + ");");
820 …this._emitLine(importedId + '.getExported(' + (node.withContext ? 'context.getVariables(), frame, …
833 …_this13._emitLine("if(Object.prototype.hasOwnProperty.call(" + importedId + ", \"" + name + "\")) …
834 _this13._emitLine("var " + id + " = " + importedId + "." + name + ";");
835 _this13._emitLine('} else {');
836 _this13._emitLine("cb(new Error(\"cannot import '" + name + "'\")); return;");
837 _this13._emitLine('}');
840 _this13._emitLine("frame.set(\"" + alias + "\", " + id + ");");
842 _this13._emitLine("context.setVariable(\"" + alias + "\", " + id + ");");
866 this._emitLine('(env, context, frame, runtime, ' + this._makeCallback(id));
867 this._emitLine(this.buffer + " += " + id + ";");
874 this._emitLine("context.getSuper(env, \"" + name + "\", b_" + name + ", frame, runtime, " + cb);
875 this._emitLine(id + " = runtime.markSafe(" + id + ");");
886 this._emitLine("parentTemplate = " + parentTemplateId);
887 this._emitLine("for(var " + k + " in parentTemplate.blocks) {");
888 this._emitLine("context.addBlock(" + k + ", parentTemplate.blocks[" + k + "]);");
889 this._emitLine('}');
893 this._emitLine('var tasks = [];');
894 this._emitLine('tasks.push(');
895 this._emitLine('function(callback) {');
897 this._emitLine("callback(null," + id + ");});");
898 this._emitLine('});');
900 this._emitLine('tasks.push(');
901 this._emitLine('function(template, callback){');
902 this._emitLine('template.render(context.getVariables(), frame, ' + this._makeCallback(id2));
903 this._emitLine('callback(null,' + id2 + ');});');
904 this._emitLine('});');
905 this._emitLine('tasks.push(');
906 this._emitLine('function(result, callback){');
907 this._emitLine(this.buffer + " += result;");
908 this._emitLine('callback(null);');
909 this._emitLine('});');
910 this._emitLine('env.waterfall(tasks, function(){');
922 this._emitLine('(function() {');
923 this._emitLine('var output = "";');
927 this._emitLine('return output;');
928 this._emitLine('})()');
942 _this15._emitLine(';');
964 this._emitLine('var parentTemplate = null;');
966 this._emitLine('if(parentTemplate) {');
967 this._emitLine('parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);');
968 this._emitLine('} else {');
969 this._emitLine("cb(null, " + this.buffer + ");");
970 this._emitLine('}');
983 _this16._emitLine('var frame = frame.push(true);');
987 this._emitLine('return {');
990 _this16._emitLine(blockName + ": " + blockName + ",");
992 this._emitLine('root: root\n};');