UNPKG

gnablib

Version:

A lean, zero dependency library to provide a useful base for your project.

24 lines (23 loc) 960 B
/*! Copyright 2023-2024 the gnablib contributors MPL-1.1 */ import { IMatchResult } from "./interfaces/IMatchResult.js"; import { IMatchDetail } from "./interfaces/IMatchDetail.js"; import { StringBuilder } from "./StringBuilder.js"; import type { WindowStr } from "./WindowStr.js"; declare const consoleDebugSymbol: unique symbol; export declare class MatchSuccess implements IMatchResult { readonly remain: WindowStr; readonly result: IMatchDetail; constructor(remain: WindowStr, result: IMatchDetail); readonly fail = false; formatDetail(sb: StringBuilder, d: IMatchDetail, indent: string): void; [Symbol.toPrimitive](): string; [consoleDebugSymbol](): string; } export declare class MatchFail implements IMatchResult { readonly pos: number; readonly result: IMatchDetail | undefined; constructor(pos: number, result?: IMatchDetail | undefined); readonly remain: undefined; readonly fail = true; } export {};