-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove setMode method #4561
remove setMode method #4561
Conversation
@@ -22,7 +22,9 @@ export declare class Lexer extends Recognizer<number> { | |||
nextToken(): Token; | |||
skip(): void; | |||
more(): void; | |||
more(m: number): void; | |||
mode(m: number): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a setMode both here and in js and mark this one as deprecated ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will be the next ANTLR version, i.e. from which version should it be marked as deprecated?
since 4.13.2?
@@ -6,4 +6,7 @@ export declare class Recognizer<TSymbol> { | |||
|
|||
removeErrorListeners(): void; | |||
addErrorListener(listener: ErrorListener<TSymbol>): void; | |||
getErrorListenerDispatch(): ErrorListener<TSymbol>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you rename to getErrorListener() and add to js ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and I think the getErrorListenerDispatch
method should be also marked as depricated in js.
@@ -0,0 +1,60 @@ | |||
import HashMap from "../src/antlr4/misc/HashMap.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you need to rebase first
@@ -6,4 +6,7 @@ export declare class Recognizer<TSymbol> { | |||
|
|||
removeErrorListeners(): void; | |||
addErrorListener(listener: ErrorListener<TSymbol>): void; | |||
getErrorListenerDispatch(): ErrorListener<TSymbol>; | |||
getLiteralNames(): string[] | []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the type is correct. The array cannot be empty and it contains string | null
elements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started from this.
I will correct it to:
getLiteralNames(): string[];
getSymbolicNames(): string[];
YesEnvoyé de mon iPhoneLe 18 mars 2024 à 18:14, Robert Einhorn ***@***.***> a écrit :
@RobEin commented on this pull request.
In runtime/JavaScript/src/antlr4/Lexer.d.ts:
@@ -22,7 +22,9 @@ export declare class Lexer extends Recognizer<number> {
nextToken(): Token;
skip(): void;
more(): void;
- more(m: number): void;
+ mode(m: number): void;
What will be the next ANTLR version, i.e. from which version should it be marked as deprecated?
since 4.13.2?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Added:
mode(...)
getMode()
(instead of_mode
field)getModeStack()
getErrorListenerDispatch()
getLiteralNames()
getSymbolicNames()
INVALID_TYPE
getTokenSource()
Removed (fixed):
more(m: number)
method