Skip to content

feat: add MLIR and TableGen language support#919

Open
stwilliam503388-creator wants to merge 1 commit into
colbymchenry:mainfrom
stwilliam503388-creator:feat/mlir-tablegen-languages
Open

feat: add MLIR and TableGen language support#919
stwilliam503388-creator wants to merge 1 commit into
colbymchenry:mainfrom
stwilliam503388-creator:feat/mlir-tablegen-languages

Conversation

@stwilliam503388-creator

Copy link
Copy Markdown

Adds tree-sitter-based parsing for MLIR (.mlir) and TableGen (.td), enabling CodeGraph to index these formats in MLIR compiler projects like ascendnpu-ir.

Changes:

  • src/types.ts: add mlir and tablegen to LANGUAGES
  • src/extraction/grammars.ts: WASM maps, extension maps, display names
  • src/extraction/wasm/: prebuilt WASM grammars (ABI v15)

Tested on 1,600+ file Huawei Ascend NPU IR project:

  • MLIR: 406 files, ~98% clean parse
  • TableGen: 70 files, 100% clean parse
    Indexing coverage improved from 1,237 to 1,604 files.

Adds tree-sitter-based parsing for:
- MLIR (.mlir) — 47/48 files parse clean on ascendnpu-ir
- TableGen (.td) — 50/50 files parse clean

WASM grammars are built from:
- artagnon/tree-sitter-mlir (latest GitHub, ABI v15)
- Flakebi/tree-sitter-tablegen (v0.0.1)
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