pegjs/lib/grammar-error.js
David Majda eaca5f0acf Add location information to |GrammarError|
This means all errors thrown by |PEG.buildParser| now have associated
location information.
2015-04-06 17:34:37 +02:00

13 lines
293 B
JavaScript

var classes = require("./utils/classes");
/* Thrown when the grammar contains an error. */
function GrammarError(message, location) {
this.name = "GrammarError";
this.message = message;
this.location = location;
}
classes.subclass(GrammarError, Error);
module.exports = GrammarError;