@@ -298,11 +298,7 @@ Compiler.prototype = {
|
||||
|
||||
// HELPERS
|
||||
opcode: function(name, node) {
|
||||
var loc = {
|
||||
firstLine: node.firstLine, firstColumn: node.firstColumn,
|
||||
lastLine: node.lastLine, lastColumn: node.lastColumn
|
||||
};
|
||||
this.opcodes.push({ opcode: name, args: slice.call(arguments, 2), loc: loc });
|
||||
this.opcodes.push({ opcode: name, args: slice.call(arguments, 2), loc: node.loc });
|
||||
},
|
||||
|
||||
addDepth: function(depth) {
|
||||
@@ -393,7 +389,7 @@ export function precompile(input, options, env) {
|
||||
options.useDepths = true;
|
||||
}
|
||||
|
||||
var ast = env.parse(input);
|
||||
var ast = env.parse(input, options);
|
||||
var environment = new env.Compiler().compile(ast, options);
|
||||
return new env.JavaScriptCompiler().compile(environment, options);
|
||||
}
|
||||
@@ -415,7 +411,7 @@ export function compile(input, options, env) {
|
||||
var compiled;
|
||||
|
||||
function compileInput() {
|
||||
var ast = env.parse(input);
|
||||
var ast = env.parse(input, options);
|
||||
var environment = new env.Compiler().compile(ast, options);
|
||||
var templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
|
||||
return env.template(templateSpec);
|
||||
|
||||
Reference in New Issue
Block a user