UNPKG

parjs

Version:

A parser-combinator library for JavaScript.

31 lines (30 loc) 731 B
/** * Errors thrown by Parjs. * * @module parjs/errors * @preferred * * */ /** */ import { ParjsFailure } from "./internal/result"; /** * A parent class for all errors thrown by Parjs. */ export declare abstract class ParjsError extends Error { name: string; } /** * An error that is thrown when it is assumed a parser will succeed, but it fails. */ export declare class ParjsParsingFailure extends ParjsError { failure: ParjsFailure; constructor(failure: ParjsFailure); } /** * An error thrown to indicate that a parser has been constructed inappropriately. */ export declare class ParserDefinitionError extends ParjsError { parserName: string; constructor(parserName: string, message: string); }