Fix ProgramNode parameter handling under IE

This commit is contained in:
kpdecker
2013-12-29 17:16:59 -06:00
parent 6c2137a420
commit 14d1d4270f
+5 -3
View File
@@ -12,11 +12,13 @@ var AST = {
ProgramNode: function(statements, inverseStrip, inverse, locInfo) {
var inverseLocationInfo, firstInverseNode;
if (arguments.length === 3) {
locInfo = inverse;
inverse = null;
locInfo = arguments[arguments.length - 1];
} else if (arguments.length === 2 ) {
locInfo = arguments[1];
} else if (arguments.length === 2) {
locInfo = inverseStrip;
inverseStrip = null;
}
LocationInfo.call(this, locInfo);
this.type = "program";
this.statements = statements;