2015-06-08 20:21:19 +02:00
|
|
|
"use strict";
|
|
|
|
|
2016-09-17 16:28:28 +02:00
|
|
|
// Thrown when the grammar contains an error.
|
2016-09-13 09:09:40 +02:00
|
|
|
class GrammarError {
|
2015-06-18 10:15:10 +02:00
|
|
|
|
2017-10-25 20:19:42 +02:00
|
|
|
constructor( message, location ) {
|
|
|
|
|
|
|
|
this.name = "GrammarError";
|
|
|
|
this.message = message;
|
|
|
|
this.location = location;
|
|
|
|
|
|
|
|
if ( typeof Error.captureStackTrace === "function" ) {
|
|
|
|
|
|
|
|
Error.captureStackTrace( this, GrammarError );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-09-13 09:09:40 +02:00
|
|
|
}
|
2017-10-25 20:19:42 +02:00
|
|
|
|
2014-05-04 14:11:44 +02:00
|
|
|
}
|
2012-11-10 09:47:22 +01:00
|
|
|
|
2014-05-04 14:11:44 +02:00
|
|
|
module.exports = GrammarError;
|