UNPKG

jc-marked

Version:

Markdown AST (Abstract syntax tree) parser based on finite-state machine (FSM).

1 lines 732 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InputTypeError=exports.StateNotExistError=void 0;const jc_color_1=require("jc-color"),__1=require("..");class _StateNotExistError extends Error{constructor(r){super((0,__1.str)((0,jc_color_1.yellow)(`[jc-marked]: There is no state named "${r}", please check states for FSM.`).redBg()))}}class _InputError extends Error{constructor(r,t){super((0,__1.str)((0,jc_color_1.yellow)(`[jc-marked]: We except a "${r}", but get a value of "${t}".`).redBg()))}}function StateNotExistError(r){return new _StateNotExistError(r)}function InputTypeError(r,t){return new _InputError(r,t)}exports.StateNotExistError=StateNotExistError,exports.InputTypeError=InputTypeError;