Comparing version 0.0.9 to 0.0.10
@@ -28,7 +28,6 @@ "use strict"; | ||
// support trailing comma | ||
if (parser.match(_Lexer.TokenType.Comma)) { | ||
const comma = parser.shift(); // but not [,] | ||
if (parser.match(_Lexer.TokenType.RBracket)) { | ||
throw new SyntaxError((0, _Error.UnknownToken)(comma)); | ||
if (parser.match(_Lexer.TokenType.RBracket)) { | ||
// but not [,] | ||
if (items.length === 0) { | ||
throw new SyntaxError((0, _Error.UnknownToken)(parser.token)); | ||
} | ||
@@ -35,0 +34,0 @@ |
@@ -30,7 +30,6 @@ "use strict"; | ||
// support trailing comma | ||
if (parser.match(_Lexer.TokenType.Comma)) { | ||
const comma = parser.shift(); // but not (,) | ||
if (parser.match(_Lexer.TokenType.RParen)) { | ||
throw new SyntaxError((0, _Error.UnknownToken)(comma)); | ||
if (parser.match(_Lexer.TokenType.RParen)) { | ||
// but not (,) | ||
if (args.length === 0) { | ||
throw new SyntaxError((0, _Error.UnknownToken)(parser.token)); | ||
} | ||
@@ -37,0 +36,0 @@ |
@@ -28,7 +28,6 @@ "use strict"; | ||
// support trailing comma | ||
if (parser.match(_Lexer.TokenType.Comma)) { | ||
const comma = parser.shift(); // but not {,} | ||
if (parser.match(_Lexer.TokenType.RBrace)) { | ||
throw new SyntaxError((0, _Error.UnknownToken)(comma)); | ||
if (parser.match(_Lexer.TokenType.RBrace)) { | ||
// but not {,} | ||
if (items.length === 0) { | ||
throw new SyntaxError((0, _Error.UnknownToken)(parser.token)); | ||
} | ||
@@ -35,0 +34,0 @@ |
{ | ||
"name": "numenor", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Customizable, safe evaluator of JavaScript-like expressions.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
114178