Skip to content

Commit 8ab3370

Browse files
ncordonjohannesheestermanRobEin
authored
Updates antlr4 (#170)
* fix: TypeScript: incorrect type in CommonTokenStream Signed-off-by: Johannes Heesterman <johannes@elfsquad.io> * added Token.DEFAULT_CHANNEL and Token.HIDDEN_CHANNEL (#4516) * added DEFAULT_CHANNEL and HIDDEN_CHANNEL constants based on: https://github.com/antlr/antlr4/blob/ebb511a04a60ae5a605aba65471c07dd854e9303/runtime/JavaScript/src/antlr4/Token.js#L59 https://github.com/antlr/antlr4/blob/ebb511a04a60ae5a605aba65471c07dd854e9303/runtime/JavaScript/src/antlr4/Token.js#L65 Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com> * added DEFAULT_CHANNEL and HIDDEN_CHANNEL constants antlr/antlr4#4110 (comment) Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com> --------- Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com> --------- Signed-off-by: Johannes Heesterman <johannes@elfsquad.io> Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com> Co-authored-by: Johannes Heesterman <johannes@elfsquad.io> Co-authored-by: Robert Einhorn <robert.einhorn.hu@gmail.com>
1 parent 1e210cb commit 8ab3370

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

vendor/antlr4/src/antlr4/CommonTokenStream.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import {Lexer} from "./Lexer";
22
import {BufferedTokenStream} from "./BufferedTokenStream";
3+
import {Token} from "./Token";
34

45
export declare class CommonTokenStream extends BufferedTokenStream {
56
// properties
6-
tokens: string[];
7+
tokens: Token[];
78
// methods
89
constructor(lexer: Lexer);
910
constructor(lexer: Lexer, channel: number);

vendor/antlr4/src/antlr4/Token.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import {CharStream} from "./CharStream";
33
export declare class Token {
44

55
static EOF: number;
6+
7+
static DEFAULT_CHANNEL: number;
8+
static HIDDEN_CHANNEL: number;
69

710
tokenIndex: number;
811
line: number;

0 commit comments

Comments
 (0)