Fix handling of JavaScript errors

Refs #258
This commit is contained in:
Max Brunsfeld 2019-01-18 09:40:09 -08:00
parent 1d46352297
commit 31bdf5eb97
2 changed files with 9 additions and 10 deletions

View file

@ -135,7 +135,6 @@ token.immediate = function(value) {
}
function normalize(value) {
if (typeof value == "undefined")
throw new Error("Undefined symbol");
@ -289,7 +288,7 @@ function grammar(baseGrammar, options) {
throw new Error("Grammar's conflicts must be an array of arrays of rules.");
}
return conflictSet.map(symbol => symbol.name);
return conflictSet.map(symbol => normalize(symbol).name);
});
}