pegjs/lib/grammar-error.js

23 lines
402 B
JavaScript
Raw Normal View History

"use strict";
2016-09-17 16:28:28 +02:00
// Thrown when the grammar contains an error.
class GrammarError {
constructor( message, location ) {
this.name = "GrammarError";
this.message = message;
this.location = location;
if ( typeof Error.captureStackTrace === "function" ) {
Error.captureStackTrace( this, GrammarError );
}
}
}
module.exports = GrammarError;