adam-mcdaniel / oakc

A portable programming language with a compact intermediate representation
Apache License 2.0
723 stars 21 forks source link

Textmate Grammar for IDE syntax highlighting #73

Open kevinramharak opened 3 years ago

kevinramharak commented 3 years ago

I created a barebones VS Code extension implementing syntax highlighting support at https://github.com/kevinramharak/oak-syntax-highlighting.

Most of it is based on the rust grammar, but it can easily be extended to support the language. As the syntax is diverging from rust it seemed like a good idea.

As its very experimental I have not made a release to the marketplace yet. If you wan't to use it I suggest you clone this project and put a link to the folder in your $user/.vscode/extensions/ folder.

example

adam-mcdaniel commented 3 years ago

Wow, this is beautiful. I'm extremely pleased with this. I wanted to write something like this myself, but I didn't know how!

kevinramharak commented 3 years ago

It should be improved to be more generic as its a bit fixated at certain rules at the moment. But this should make it easier to write .ok programs for now. VS Code provides a fairly good documentation and yeoman templates to set up language support. Would be cool to eventually move stuff to an actual language server to provide code completion.