How to contribute
August 18, 2026 ยท View on GitHub
Contributions of any kind are welcome and appreciated.
What features are allowed
Any feature that is part of the core project and does not deviate from what the product is will be considered to be accepted.
Making Changes
- Fork the repository
- Create a new branch from main (usually) and with a meaningful name for your changes
- Make your changes
- Commit and push your change
- Run
npm run formatbefore committing - a pre-commit hook rejects unformatted files (npm installenables it, andnpm run format:checkreports without writing)
- Run
- open a Pull Request for the main branch
Re-generating parse after grammar change
:beetle: There is a bug in the generated ANTLR output that must be corrected by hand in the generated output to make this work.
- Note: I am not an expert with language parsing/antler and I did not create the grammar, so I was not able to figure this bug out. I believe the problem relies with
antlr4ts-cliand the way imports are always added to the end of the file
Generate lexer and parser
- Run
npm run antlr- This will remove and re-generate all of the lexer and parser files required to parse SOQL
- :beetle: Manual steps:
- Open
SOQLParser.tsafter the file generation - Find the class
Keywords_alias_allowedContextsomewhere near line ~44K - Cut this class and all remaining classes through the end of the file and paste right underneath the
importstatements
- Open
- Run all unit tests afterwards
npm run test- if anything is broken, please troubleshoot or create a PR and ask for assistance
Update code to support new grammar
- Start with adding a new unit test
- This will ensure the parser and composer support the syntax
- Update the parser to listen for the new grammar (this depends on grammar change that was implemented)
- Assuming there is a new clause somewhere, look in
lib/generated/SOQLListener.tsto find the new enter/exit methods that were added - Implement these methods in
lib/SOQLListener.tsto handle parsing the logic - Update
lib/SOQLComposer.tsto handle creating the SOQL query from the parsed query
- Assuming there is a new clause somewhere, look in
Unit tests
- ensure your new unit tests cover all the cases
- Ensure unit tests are all passing, or open a PR and ask for assistance