pygments icon indicating copy to clipboard operation
pygments copied to clipboard

Add Odin Lang lexer

Open CollinEMac opened this issue 5 months ago • 1 comments

This PR adds a lexer for the Odin language.

Most of the actual lexer was already defined already in the related issue (https://github.com/pygments/pygments/issues/1969). I only made one small change around nested multi-line comments and created the tests.

NOTE: One weird thing you might notice is that there already exists an ODIN directory and references to odin in the project. ODIN is actually a different, much less popular, project . For this reason I've added this Odin, as odinlang where necessary.

CollinEMac avatar Aug 11 '25 04:08 CollinEMac

Would be great to get this merged. Currently odin code looks broken, presumably because it's using the opther Odin project's syntax.

One problem you may have, though, is how to tell which syntax a .odin file is.

example of odin code: https://git.sr.ht/~jshurmer/advent-of-code/tree/master/item/2025/1.odin

JordanShurmer avatar Dec 04 '25 16:12 JordanShurmer