codeque-co/codeque

Add other languages

Closed this issue · 10 comments

Hi please add other languages like C,C++,Dart,Python

jayu commented

Definitely CodeQue will support more languages in future. It's not that straight forward to add support for new languages, but I will work on that in future :)

Thank you very much.
I am very happy to hear this.

jayu commented

I will actually reopen that issue, maybe others would be eager to comment or list languages that should be supported

php, html and html-based languages would be fantastic and super useful! <3

Supporting Python and Julia would be so helpful.

C# and Razor would be fantastic :)

I think before that though, the main config markup languages would probably be the most helpful (yaml, xml, etc)

jayu commented

I'm working on PoC support for HTML and CSS, it looks promising :D

Ours would be OCaml / ReasonML / Melange, but I suspect that's going to be low priority. :P

Looks super-cool, wish I could use it outside plain-TypeScript projects in 2023. )=

Supporting languages one-by-one seems like something of a nonstarter; have you considered using something like treesitter or Semgrep as a 'backend', something that will make adding (at least basic support) for other languages' ASTs a little easier?

Please add ruby support!

jayu commented

Hello everyone!

I'm happy to announce that in recent months I worked integrating several new parsers for CodeQue.

CodeQue core is now parser agnostic and basically any parser producing AST in JSON format can be integrated with the tool.

I've also invested time into deep dive in tree-sitter API and as a result I've build foundations for integrating any tree-sitter parser via WebAssembly.

Tree sitter parser is surprisingly slower comparing to Babel, but after some strange optimizations on JS side that I had to make, it's fast enough to serve for CodeQue search.

Big thanks for @ELLIOTTCABLE and @sschneider-ihre-pvs for suggesting using tree-sitter.

In recent months I've released support for:

  • HTML
  • CSS
  • Python
  • Lua

It's worth mentioning that adding basic Lua support via tree sitter took ~4h, which is relatively small amount of time.

I will now close this issue and open a new one for each programming language that was mentioned in this thread.