import { ErrorListener, RecognitionException, Recognizer } from 'antlr4'; export interface CashScriptErrorListener { syntaxError(recognizer: unknown, offendingSymbol: unknown, line: number, charPositionInLine: number, message: string, e?: unknown): void; } /** * Error listener that forwards syntax errors to another listener and stores the first error. */ export declare class ForwardingErrorListener extends ErrorListener implements CashScriptErrorListener { private readonly errorListener; private firstError?; constructor(errorListener: CashScriptErrorListener); syntaxError(recognizer: unknown, offendingSymbol: unknown, line: number, charPositionInLine: number, message: string, e?: unknown): void; throwFirstError(): void; } /** * ANTLR Error Listener that immediately throws on error. This is used so that * ANTLR doesn't attempt any error recovery during lexing/parsing and fails early. */ export declare class ThrowingErrorListener extends ErrorListener { static readonly INSTANCE: ThrowingErrorListener; syntaxError(_recognizer: Recognizer, offendingSymbol: TSymbol, line: number, charPositionInLine: number, message: string, _e?: RecognitionException): void; }