Stream: announcements

Topic: ✔ New tree-sitter for existing roc syntax


view this post on Zulip Eli Dowling (Mar 08 2025 at 15:59):

Hey folks, I know it's been a while, but I finally got around to finishing the update to the TS syntax for roc.
Should support all syntax in the existing rust compiler. (except WSA)
https://github.com/faldor20/tree-sitter-roc

For those testing the new compiler, I got a bit ahead and implemented the new syntax here:
https://github.com/roc-lang/roc/issues/7106
You can find that version here:
https://github.com/faldor20/tree-sitter-roc/tree/new-syntax

Something I spent quite a while making work was being able to color effectful and shadowable idents:

(identifier "!")@ident.effectful
(identifier "_")@ident.shadowable

It parses the "!" and "_" separate, so we can then query only effectful/shadowable idents

view this post on Zulip Isaac Van Doren (Mar 08 2025 at 17:38):

Thanks for working on this! :roc:

view this post on Zulip Anthony Bullard (Mar 10 2025 at 13:43):

Thank you for your hard work Eli, especially on the new syntax support!

view this post on Zulip Anthony Bullard (Mar 10 2025 at 13:45):

I wonder selfishly how hard it would be to create a .snapshot.roc grammar that has embeds for the new Roc grammar and the SExpr syntax (as just Scheme or basic LISP) in our snapshot files

view this post on Zulip Anthony Bullard (Mar 10 2025 at 13:46):

And also treat the section dividers as comments (with maybe some highlighting for the section header text

view this post on Zulip Eli Dowling (Mar 10 2025 at 13:46):

Not hard at all! Embeds are super easy. If you make a discussion with some syntax examples I can offer advice or if it's simple just do it this arvy

view this post on Zulip Anthony Bullard (Mar 10 2025 at 13:53):

Cool, yeah I'll probably take a shot at it sometime soon

view this post on Zulip Anthony Bullard (Mar 10 2025 at 13:53):

It'll be great for snapshots to be easy to read unlike our old snapshots

view this post on Zulip Eli Dowling (Mar 10 2025 at 15:49):

I just made an update to the syntax to fix some issues @JanCVanB noticed.

view this post on Zulip Notification Bot (Jun 04 2025 at 11:43):

Daniel Schierbeck has marked this topic as resolved.


Last updated: Jul 26 2025 at 12:14 UTC