Skip to content

feat: add support for the Odin programming language - #1000

Open
RainerXE wants to merge 4 commits into
colbymchenry:mainfrom
RainerXE:main
Open

feat: add support for the Odin programming language#1000
RainerXE wants to merge 4 commits 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).

RainerXE added 4 commits June 26, 2026 20:59
Resolve conflicts in the language registry (types.ts, grammars.ts,
languages/index.ts) by keeping the Odin support alongside the new
upstream CFML/CFScript/CFQuery languages. Add an Odin changelog entry
under [Unreleased].
Integrate the newly-added upstream COBOL language support alongside
Odin, resolving conflicts in grammars.ts and the CHANGELOG so both
languages are registered.
@RainerXE

Copy link
Copy Markdown
Author

I resolved the conflicts again and update for integration. Please be so kind and merge my commits. Thx Rainer

@cjgratacos

Copy link
Copy Markdown

you still have merge conflicts leftovers to fix, and you should remove the .worktree folder you commited

ivandrenjanin added a commit to ivandrenjanin/transcibr that referenced this pull request Aug 5, 2026
The generated block tells an agent to reach for CodeGraph before grep, and
degrades on the ABSENCE of a `.codegraph/` directory. This repository has one,
so the advice reads as live when it is not: CodeGraph has no Odin support, and
upstream PR colbymchenry/codegraph#1000 adding it has not landed.

Measured rather than assumed -- `codegraph status` reports 1 file, 0 nodes, 0
edges, language `yaml`. It indexes this repository's YAML and none of its 80
`.odin` files. Two review passes reached that number independently, each after
spending turns on a tool that cannot answer.

The note sits OUTSIDE the CODEGRAPH_START/END markers, because what is between
them is generated and a regeneration would take the correction with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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