Skip to content

feat: add support for the Odin programming language#1000

Open
RainerXE wants to merge 1 commit into
colbymchenry:mainfrom
RainerXE:main
Open

feat: add support for the Odin programming language#1000
RainerXE wants to merge 1 commit into
colbymchenry:mainfrom
RainerXE:main

Conversation

@RainerXE

Copy link
Copy Markdown

This PR adds support for indexing and extracting code structure from the Odin programming language (.odin).

Summary of Changes

  1. Odin Language Extractor:

    • Added support for extracting procedures, structs, unions, bit-fields, enums, enum members, variables/constants, struct fields, and import declarations.
    • Built and integrated the tree-sitter-odin.wasm grammar binary.
  2. Core Struct Field Bug Fix:

    • Modified extractStruct in src/extraction/tree-sitter.ts to leverage the custom resolveBody hook (similar to enums).
    • This ensures that struct fields are successfully resolved even for languages whose tree-sitter grammars do not define a named body field on the struct declaration nodes.

Verification

Tested successfully against:

  • Small test projects.
  • The tarn repository.
  • A large, complex Odin codebase (RuiShin, indexing 11,970 Odin nodes and 21,294 Odin relations in under 40 seconds).

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.

1 participant