Conversation
Currently the JS runtime sometimes returns (and mangles) the global `window` object instead of a proper InputStream. This is prevented by using the `new` keyword in all cases.
…s available on Lexer prototype for use in lexer actions (this.SOME_MODE) like in Java actions, Utils.escapeWhiteSpace uses regex for global replace (was replacing only first occurnce of \n etc).
For JavaScript runtime, Interval class constructor assume start and stop to be number.
The usage of this method was removed in commit 51edf3cece13b42b8419c7d2587a4e2beeb05fd9, but the parameter remained.
JavaScript parse tree visitor: check if ctx.children is non-null in visitChildren
Signed-off-by: Alex Miller <codex.nz@gmail.com>
90d4a0a to
67e5fb8
Compare
OskarDamkjaer
approved these changes
Sep 26, 2023
Collaborator
OskarDamkjaer
left a comment
There was a problem hiding this comment.
let's hope we get a new release from antlr soon 🤞
fb98c15 to
64476b2
Compare
ncordon
commented
Sep 26, 2023
Contributor
Author
ncordon
left a comment
There was a problem hiding this comment.
Let's leave the PR open for now and wait for an official release. At least it's easier to rebase changes instead of doing all the process of adding antlr4 and adjusting the build scripts etc again.
If they don't release a new antlr4 before our NODES conference, we can merge this the week before that.
64476b2 to
27ec9ff
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Inlines the antlr4 Javascript upstream package in the repository
Why
Because we contributed a performance improvement that has yet not made it into a usable release. This is intended to be temporary. We want for users not to find perfomance issues when they use the language support.
How
This has been done by doing:
and then inside this repo locally: