-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(JS: ErrorListener types) (#4731)
* fix(JS: ErrorListener types) Signed-off-by: Francisco Rodriguez Elorza <[email protected]> * update DiagnosticErrorListener type Signed-off-by: Francisco Rodriguez Elorza <[email protected]> * Remove write methos on BitSet Signed-off-by: Francisco Rodriguez Elorza <[email protected]> --------- Signed-off-by: Francisco Rodriguez Elorza <[email protected]> Co-authored-by: Francisco Rodriguez Elorza <[email protected]>
- Loading branch information
Showing
3 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
8 changes: 1 addition & 7 deletions
8
runtime/JavaScript/src/antlr4/error/DiagnosticErrorListener.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
import {ErrorListener} from "./ErrorListener"; | ||
import {Recognizer} from "../Recognizer"; | ||
import {RecognitionException} from "./RecognitionException"; | ||
|
||
export declare class DiagnosticErrorListener<TSymbol> implements ErrorListener<TSymbol> { | ||
|
||
syntaxError(recognizer: Recognizer<TSymbol>, offendingSymbol: TSymbol, line: number, column: number, msg: string, e: RecognitionException | undefined): void; | ||
|
||
} | ||
export declare class DiagnosticErrorListener<TSymbol> extends ErrorListener<TSymbol> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
import {Recognizer} from "../Recognizer"; | ||
import {RecognitionException} from "./RecognitionException"; | ||
import { ATNConfigSet } from "../atn"; | ||
import { BitSet } from '../misc/BitSet'; | ||
import { DFA } from "../dfa"; | ||
import { Recognizer } from "../Recognizer"; | ||
import { RecognitionException } from "./RecognitionException"; | ||
|
||
export declare class ErrorListener<TSymbol> { | ||
reportAmbiguity(recognizer: Recognizer<TSymbol>, dfa: DFA, startIndex: number, stopIndex: number, exact: boolean, ambigAlts: BitSet, configs: ATNConfigSet): void; | ||
|
||
reportAttemptingFullContext(recognizer: Recognizer<TSymbol>, dfa: DFA, startIndex: number, stopIndex: number, conflictingAlts: BitSet, configs: ATNConfigSet): void; | ||
|
||
reportContextSensitivity(recognizer: Recognizer<TSymbol>, dfa: DFA, startIndex: number, stopIndex: number, prediction: number, configs: ATNConfigSet): void; | ||
|
||
syntaxError(recognizer: Recognizer<TSymbol>, offendingSymbol: TSymbol, line: number, column: number, msg: string, e: RecognitionException | undefined): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export declare class BitSet { | ||
// write methods are not exposed based on this conversation https://github.com/antlr/antlr4/pull/4731#discussion_r1847139040 | ||
readonly length: number; | ||
|
||
get(index: number): number; | ||
|
||
values(): Array<number>; | ||
|
||
minValue(): number; | ||
|
||
hashCode(): number; | ||
|
||
equals(): boolean; | ||
|
||
toString(): string; | ||
|
||
static _bitCount(l: number): number; | ||
} |