parjs
Version:
A parser-combinator library for JavaScript.
31 lines (30 loc) • 1.11 kB
JavaScript
;
/**
* @module parjs/internal
*/ /** */
Object.defineProperty(exports, "__esModule", { value: true });
const errors_1 = require("../errors");
/**
* Some canned error throwers.
*/
var Issues;
(function (Issues) {
/**
* Throws an error saying that the parser is about to enter an infinite
* loop.
* @param name
*/
function guardAgainstInfiniteLoop(name) {
throw new errors_1.ParserDefinitionError(name, `The combinator '${name}' expected one of its arguments to change the parser state.`);
}
Issues.guardAgainstInfiniteLoop = guardAgainstInfiniteLoop;
function delayedParserNotInit(name) {
throw new errors_1.ParserDefinitionError(name, `Delayed parser not initalized.`);
}
Issues.delayedParserNotInit = delayedParserNotInit;
function delayedParserAlreadyInit() {
throw new errors_1.ParserDefinitionError("", `Delayed parser has already been initialized`);
}
Issues.delayedParserAlreadyInit = delayedParserAlreadyInit;
})(Issues = exports.Issues || (exports.Issues = {}));
//# sourceMappingURL=issues.js.map