Skip to content

Conversation

@Igonato
Copy link

@Igonato Igonato commented Dec 24, 2025

Adding Odin support (#182). Currently there are false positives with CONSTANTS in enum variant values and bit_fields size:

image

Can use another pair of eyes, I might be missing a way to make a query that can handle this case. It is also possible that's the grammar needs changing. Grammar for reference: https://github.com/tree-sitter-grammars/tree-sitter-odin/blob/master/grammar.js

What do you think?

@blopker
Copy link
Owner

blopker commented Dec 31, 2025

This looks great so far, but oof, I have no idea how to read Odin. There's also no Odin support in my tree-sitter visualizer, so debugging this will take some time. I'd be happy to merge this as is though if you want it in now?

@Igonato
Copy link
Author

Igonato commented Jan 1, 2026

Hey, I'd like to spend more time on it, just got distracted with the holidays (Happy New Year btw 🎉). I'm reading up on Tree-sitter, I wanted to learn how to make a parser anyway, then I'll know for sure if it's limited by the grammar or just needs a better query.

@blopker
Copy link
Owner

blopker commented Jan 1, 2026

Happy new year! Sounds good. I find that adding tests helps with the iteration speed a lot. Happy to answer any questions, but I have no experience with Odin specifically 🙂

@Igonato
Copy link
Author

Igonato commented Jan 1, 2026

Oh, I had some tests already, just didn't include them in the PR. They immediately flagged the duplication and I figured better do a proper fix instead of figuring how to suppress those and submitting a partial solution.

Odin is quite simple, no-nonsense, boring in a good way and the community is awesome! If you find a spare hour, I would encourage you to look up some interviews with the creator of Odin @gingerBill and give the language a try. I found that it simplicity brought back joy to my programming life, serving as a nice break from the Web and Rust stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants