Skip to content

Tree-sitter implementation for Salesforce's Apex, SOQL, and SOSL

License

Notifications You must be signed in to change notification settings

rickroesler/tree-sitter-sfapex

 
 

Repository files navigation

tree-sitter-sfapex

Salesforce grammars for tree-sitter, including Apex, SOQL, and SOSL languages.

Try it out using our playground

Status

Most of the parsers are built and tested on large corpus of Apex, I still intend to write automated tests that parse large Apex libraries as part of evaluating the grammar.

Apex

  • grammar
  • grammar tests
  • highlighting queries
  • highlighting tests
  • tags queries
  • tags tests (could use more)
  • locals queries
  • locals tests (using highlighting)

Anonymous Apex

  • grammar
  • grammar tests
  • highlighting queries
  • highlighting tests
  • tags queries
  • tags tests (could use more)
  • locals queries
  • locals tests (using highlighting)

This won't be difficult, I just haven't tackled it yet, will largely reuse the Apex grammar with some different construction rules.

SOQL

  • grammar
  • grammar tests
  • highlighting queries
  • highlighting tests

SOSL

  • grammar
  • grammar tests
  • highlighting queries
  • highlighting tests

(not sure tags and locals are relevant to query grammars)

Questions/Issues

Please open an issue on this repo and we'll work through it.

Contributing

Still figuring this out. By far the most useful contributions would be tests, if you have a scenario that doesn't work you can just provide the example or open a PR with a new failing test and I can figure out what to do about it.

About

Tree-sitter implementation for Salesforce's Apex, SOQL, and SOSL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.0%
  • JavaScript 1.2%
  • Apex 0.8%
  • ObjectScript 0.6%
  • Scheme 0.2%
  • Rust 0.1%
  • Other 0.1%