Comparing version 5.0.2 to 5.0.3
@@ -118,3 +118,3 @@ "use strict"; | ||
function resolveParameters(macro, node) { | ||
var l = macro.parameters.length; | ||
var l = Math.min(macro.parameters.length, node.parameters.length); | ||
var results = new Array(l); | ||
@@ -158,3 +158,3 @@ var i; | ||
for (i = 0; i < l; i++) { | ||
for (i = 0; i < macro.parameters.length; i++) { | ||
if (!results[i]) { | ||
@@ -166,3 +166,3 @@ missing.push(macro.parameters[i]); | ||
if (missing.length !== 0) { | ||
throw new SyntaxError("Missing values for parameters " + missing.join(", ")); | ||
throw node.missing(missing); | ||
} | ||
@@ -465,2 +465,4 @@ | ||
} | ||
} else { | ||
compiler.scope.used[parameter.name] = true; | ||
} | ||
@@ -615,3 +617,3 @@ | ||
if (options.debug) { | ||
console.log(code); | ||
console.error(code); | ||
} | ||
@@ -618,0 +620,0 @@ |
{ | ||
"name": "razorleaf", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "index.js", |
@@ -400,2 +400,11 @@ /* eslint-disable no-shadow */ | ||
if (c === ")") { | ||
var endPosition = parser.getPosition(); | ||
parser.context.missing = function (missing) { | ||
return parser.error( | ||
(missing.length === 1 ? "Missing value for parameter " : "Missing values for parameters ") + missing.join(", "), | ||
endPosition | ||
); | ||
}; | ||
return contentState; | ||
@@ -488,3 +497,3 @@ } | ||
parser.badMacroCallParameters = null; | ||
return contentState; | ||
return macroCallBeforeParameterState(parser, c); | ||
} else { | ||
@@ -491,0 +500,0 @@ parser.macroCallParameter = ""; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70937
2166