Skip to content
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

depricate some methods #4562

Merged
merged 2 commits into from
Mar 19, 2024
Merged

depricate some methods #4562

merged 2 commits into from
Mar 19, 2024

Conversation

RobEin
Copy link
Contributor

@RobEin RobEin commented Mar 18, 2024

Added TypeScript members:

  • Lexer.setMode()
  • Lexer.getMode()
  • Lexer.getModeStack()
  • Recognizer.getErrorListener()
  • Recognizer.getLiteralNames()
  • Recognizer.getSymbolicNames()
  • Token.INVALID_TYPE
  • Token.getTokenSource()

Removed (fixed) TypeScript member:

  • Lexer.more(m: number)

Added JavaScript members:

  • Lexer.setMode()
  • Lexer.getMode()
  • Lexer.getModeStack()
  • Recognizer.getErrorListener()

Depricated JavaScript members:

  • Lexer.mode(...)
  • Recognizer.getErrorListenerDispatch()

Phlosioneer and others added 2 commits March 19, 2024 00:54
This PR adds the four parse listener methods. The `_parseListeners` field
could also be set to `ParseTreeListener[]`, but it would _technically_ be
a breaking change.

I chose to use `ParseTreeListener` instead of `any` in these methods because
parse listeners cannot actually be `any`; their functions are called without
checking if they're defined. The current ParseTreeListener interface is the
minimum requirement to avoid exceptions.

Signed-off-by: Phlosioneer <mattmdrr2@gmail.com>
Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com>
Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com>
@RobEin RobEin marked this pull request as draft March 18, 2024 23:55
@RobEin RobEin marked this pull request as ready for review March 18, 2024 23:56
Copy link
Contributor

@ericvergnaud ericvergnaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thnaks for this and for being so patient.!

@ericvergnaud ericvergnaud merged commit 6ba4f8c into antlr:dev Mar 19, 2024
38 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants