Skip to content

Conversation

ncordon
Copy link
Contributor

@ncordon ncordon commented Sep 25, 2023

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:

git subtree split --prefix=runtime/JavaScript -b javascript
# To recover license on top of the tree in ANTLR repo
git checkout LICENSE.txt
git add . && git commit -m "Adds LICENSE of main ANTLR repo"

# Move everything into a subdirectory
mkdir -p packages/antlr4
mv * packages/antlr4
mv .babelrc .c8rc.json .eslintignore .eslintrc.yml .gitignore .project packages/antlr4

git add . && git commit -m "Moves everything inside packages/antlr4 folder"

and then inside this repo locally:

git remote add antlr4-local /Users/ncordon/neo4j/intellisense/antlr4
git merge antlr4-local/javascript --allow-unrelated-histories

bhamiltoncx and others added 30 commits February 23, 2017 09:39
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
@ncordon ncordon force-pushed the adds-antlr4 branch 2 times, most recently from 90d4a0a to 67e5fb8 Compare September 26, 2023 07:42
Copy link
Collaborator

@OskarDamkjaer OskarDamkjaer left a comment

Choose a reason for hiding this comment

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

let's hope we get a new release from antlr soon 🤞

@ncordon ncordon force-pushed the adds-antlr4 branch 2 times, most recently from fb98c15 to 64476b2 Compare September 26, 2023 08:09
Copy link
Contributor Author

@ncordon ncordon left a comment

Choose a reason for hiding this comment

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

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.

@ncordon ncordon force-pushed the adds-antlr4 branch 4 times, most recently from 64476b2 to 27ec9ff Compare October 6, 2023 15:14
@ncordon ncordon merged commit d67006c into main Oct 6, 2023
@ncordon ncordon deleted the adds-antlr4 branch October 6, 2023 16:43
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.