feat: add CUDA (.cu/.cuh) and IEC 61131-3 SCL (.scl/.st) language support#875
Open
zouyuanqing wants to merge 2 commits into
Open
feat: add CUDA (.cu/.cuh) and IEC 61131-3 SCL (.scl/.st) language support#875zouyuanqing wants to merge 2 commits into
zouyuanqing wants to merge 2 commits into
Conversation
…port CUDA: - New 'cuda' language type, reuses tree-sitter-cpp.wasm + cppExtractor - Full C/C++ resolution pipeline integration: #include resolution, compile_commands.json -I directory search, standard library detection, import mappings all share CUDA path alongside C/C++ - Cross-language reference resolution: CUDA added to C family (c/cpp/cuda) in name-matcher, so .cu ↔ .c ↔ .cpp ↔ .h references resolve as same-family - Extension resolution for .cuh/.cu in import-resolver SCL (IEC 61131-3 Structured Text): - New 'scl' language type, .scl/.st extensions - File-level tracking only (matching yaml/twig/properties conventions) - GrammarLanguage type fixed to exclude 'scl' - Fix: SCL files no longer silently dropped during single-file indexing (isLanguageSupported now returns true) Tests: - SCL: language detection, grammar loaded, file-level-only flag, file-record tracking with zero-symbol validation - CUDA: fixture extraction (selective_scan.cu kernel), #include import nodes, function call edges, .cuh struct extraction, language attribution on all node kinds Closes colbymchenry#387, advances colbymchenry#441
aa9e3e0 to
a20629e
Compare
- tree-sitter.ts: chained call parsing (obj.method() via -> / .) - callback-synthesizer.ts: C++ override edge synthesis (2 places) - name-matcher.ts: bareFnOnly, dotMatch member resolution, C++ call chain resolution (Foo::instance().bar()) These 5 branches only gate on cpp/c — CUDA files would silently miss callback synthesis, bare kernel-call resolution, and method-call resolution on these paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds language support for CUDA (.cu\ / .cuh) and IEC 61131-3 SCL (.scl\ / .st).
CUDA — Closes #387
Type & extraction
Resolution pipeline (the part that makes this actually useful)
CUDA files now share the full C/C++ resolution path:
This means #include\ references from .cu\ files resolve to their headers, cross-file function calls produce edges, and .cu\ ↔ .cpp\ ↔ .h\ cross-references work correctly.
SCL (IEC 61131-3 ST) — Advances #441
Tests (149 new lines)
SCL
CUDA
Files changed
Total: +216 −10
Not in this PR