Repository navigation
feat(ai): AST support for C#, C, C++, shell and Markdown - #570
Merged
Merged
Conversation
C#, C, C++, shell and Markdown files yielded no symbols, so repomaps, context packing and review grounding saw nothing in them. The tree-sitter grammars for C#, C, C++, bash and Markdown (block) are mapped to their extensions, and a .h header is parsed as C++ when its content is. C and C++ names come through the declarator chain, so pointer-returning, qualified and macro-wrapped definitions are named, and a header's prototypes count through include guards, extern "C", namespaces and templates. C# namespaces, types and members, shell functions and Markdown headings (a new heading kind) are extracted, and regex fallbacks cover each language. Checked on the pinned serilog, cJSON, fmt, nvm and kind docs samples. Closes #506
dan-petty
enabled auto-merge (squash)
September 25, 2026 02:12
This was referenced Sep 25, 2026
Merged
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
C#, C, C++, shell and Markdown files yielded no symbols, so repomaps, context packing and review grounding saw nothing in them.
tree-sitter-c-sharp0.23.5tree-sitter-c0.24.2tree-sitter-cpp0.23.4 (official; last released 2024-11)tree-sitter-bash0.25.1tree-sitter-markdown0.5.1, block grammar.cs,.c/.h,.cc/.cpp/.cxx/.c++/.hh/.hpp/.hxx,.sh/.bash/.envsh,.md/.markdown, plus the aliasesshell,sh,c#,cs,c++,md..hheaders are C++ when they contain a namespace, a template, a class body or::, and C otherwise. fmt's headers are C++.*f,Class::f,operator++,~T);extern "C"(and so behindCJSON_PUBLIC(...)export macros), namespaces and templates;usingaliases and function-like macros also count.headingkind, skipping front matter and fenced#lines.On the pinned samples
Files without symbols declare none, for example docs pages with only front matter and prose.
Tests
tests/test_ast_more_languages.pyuses snippets following each sample. It covers:Updated tests:
README.mdnow maps to Markdown;bash;.yaml.uv run devops ci --force: 13/13 gates pass.Closes #506