diff --git a/lib/parser.js b/lib/parser.js index afa58c7..a0b4d2a 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -260,9 +260,10 @@ module.exports = (function() { peg$c97 = { type: "literal", value: "-", description: "\"-\"" }, peg$c98 = function(begin, end) { if (begin.data.charCodeAt(0) > end.data.charCodeAt(0)) { - throw new this.SyntaxError( + error( "Invalid character range: " + begin.rawText + "-" + end.rawText + "." ); + return; } return {