Feature: Add VB.NET language support (tree-sitter approach)#675
Open
Michael2150 wants to merge 1 commit into
Open
Feature: Add VB.NET language support (tree-sitter approach)#675Michael2150 wants to merge 1 commit into
Michael2150 wants to merge 1 commit into
Conversation
Add first-class VB.NET support via a bundled tree-sitter grammar and extractor. This introduces a new wasm grammar (tree-sitter-vbnet.wasm), a vbnet language extractor implementation, and comprehensive unit tests for class/module/method/enum/import/property/constant/call extraction. The Roslyn-based extractor and its special-casing were removed so VB.NET is parsed natively by the tree-sitter pipeline; loader/registry code was updated to include the vbnet WASM and extractor. README, changelog, and agent-eval corpus were updated to document VB.NET support.
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.
Add native VB.NET tree-sitter extraction
Supersedes #170 (closed — never applied).
The original PR depended on an external companion project (codegraph-roslyn) that invoked Roslyn as a subprocess and required shipping platform-specific native binaries alongside the npm package. That approach doesn't fit the self-contained model codegraph uses for every other language, so this PR rebuilds VB.NET support from scratch using a bundled tree-sitter grammar instead.
What gets extracted
Node kinds:
class,module,struct,interface,enum,enum_member,method(Sub/Function, constructors viaSub New),property,field,constant,namespace,importEdges:
calls(invocations),contains,imports,instantiatesVB.NET-specific handling:
Moduleblocks extracted asmodulekind withisStatic: true(VB.NET Modules are implicitly static sealed types, not regular classes)Structureblocks extracted asstructkind with full member nesting (fields, properties, methods)Inherits/Implementslines are filtered out — the grammar misparsed them asfield_declarationnodes; the extractor detects and drops themSub Newextracted as a method namedNew(constructor)Sharedmodifier maps toisStatic: trueFriendmodifier maps to'internal'visibilityAsyncmodifier maps toisAsync: true(params) As ReturnTypefor Functions,(params)for SubsFiles changed
src/types.ts—'vbnet'added toLANGUAGESsrc/extraction/grammars.ts—.vbextension mapping,'vbnet': 'VB.NET'display name, vendored wasm pathsrc/extraction/languages/vbnet.ts(new) — full VB.NET extractor: type classification, visibility, modifiers, signature generation, namespace/module/struct/const handling viavisitNodesrc/extraction/languages/index.ts—vbnetExtractorregisteredsrc/extraction/wasm/tree-sitter-vbnet.wasm(new) — bundled grammar (see provenance below)__tests__/extraction.test.ts— smoke test covering all node kinds in one passCHANGELOG.md— entry under[Unreleased]README.md— VB.NET listed as supportedsrc/extraction/wasm/tree-sitter-vbnet.wasm— provenanceBuilt from
tree-sitter-vb-dotnet@0.1.9(by codeant-ai).The npm package ships grammar source only (no prebuilt WASM), so the file was compiled locally:
Testing
Validated against the
codegraph-roslynfixture repo (7 VB.NET files, 20 C# files):