UNPKG

1.08 kBTypeScriptView Raw
1/*!
2 * Copyright 2016 The ANTLR Project. All rights reserved.
3 * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4 */
5import { ANTLRErrorListener } from "./ANTLRErrorListener";
6import { RecognitionException } from "./RecognitionException";
7import { Recognizer } from "./Recognizer";
8/**
9 *
10 * @author Sam Harwell
11 */
12export declare class ConsoleErrorListener implements ANTLRErrorListener<any> {
13 /**
14 * Provides a default instance of {@link ConsoleErrorListener}.
15 */
16 static readonly INSTANCE: ConsoleErrorListener;
17 /**
18 * {@inheritDoc}
19 *
20 * This implementation prints messages to {@link System#err} containing the
21 * values of `line`, `charPositionInLine`, and `msg` using
22 * the following format.
23 *
24 * <pre>
25 * line *line*:*charPositionInLine* *msg*
26 * </pre>
27 */
28 syntaxError<T>(recognizer: Recognizer<T, any>, offendingSymbol: T, line: number, charPositionInLine: number, msg: string, e: RecognitionException | undefined): void;
29}