INNER CODE UNIT · TypeScript

ErrorCollector

be-thomas/OpenPineScript · parser/v1/index.ts:27

export class ErrorCollector extends BaseErrorListener<any> {
  errors: ParserError[] = [];

  override syntaxError(
    recognizer: any,
    offendingSymbol: any,
    line: number,
    charPositionInLine: number,
    msg: string,
    e: any,
  ): void {
    this.errors.push({ line, column: charPositionInLine, message: msg });
  }
}

export interface ParseResult<TTree> {
  tree: TTree;
  errorCount: number;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…