tree-sitter-grammars / tree-sitter-odin

Odin grammar for tree-sitter
MIT License
17 stars 4 forks source link

feat: support the new bit_field type #12

Closed laytan closed 5 months ago

laytan commented 5 months ago

Latest release added a new type bit_field:

Foo :: bit_field u16 { // backing type must be an integer or array of integers
    x: i32     | 3, // signed integers will be signed extended on use
    y: u16     | 2 + 3, // general expressions
    z: My_Enum | foo.SOME_CONSTANT, // ability to define the bit-width elsewhere
    w: bool    | foo.SOME_CONSTANT > 10 ? 2 : 1,
}

This PR adds support for it.

amaanq commented 5 months ago

Nice, thanks. just gonna regenerate using the latest version