🇪🇸 Español
Agregar soporte para C# generando un call graph (funciones/métodos como nodos, llamadas como aristas), siguiendo la arquitectura pluggable.
Por qué encaja
- El grammar ya viene incluido:
node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm — solo hay que copiarlo a public/wasm/ (no hay que compilar nada).
- C# es un call-graph clásico con clases/métodos/herencia, así que encaja en el patrón
LangSpec + analyzeProjectWith (como los analyzers de JavaScript/TypeScript).
Tareas
- Copiar
tree-sitter-c_sharp.wasm a public/wasm/.
- Crear
src/lib/analysis/analyzers/csharp.ts con un LangSpec: definiciones de métodos/funciones locales, clases (class_declaration), llamadas (invocation_expression), extends/interfaces (lista de bases) y using para imports.
- Registrarlo en
registry.ts y cablear EXT/PROJECT_EXTS (.cs), selector + sample en CodeWorkspace, y los chips de Hero/Features.
- Tests en
analyzers.test.ts (call graph entre archivos, clases/herencia, grafo vacío).
- Actualizar docs (
Languages.tsx) y README (en/es).
Punto de partida: mirar los analyzers existentes typescript.ts/javascript.ts (tienen clases) y el PR de Rust (#77) como referencia del cableado.
🇬🇧 English
Add C# support, generating a call graph (functions/methods as nodes, calls as edges), following the pluggable architecture.
Why it fits
- The grammar is already bundled:
node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm — just copy it to public/wasm/ (no build needed).
- C# is a classic call graph with classes/methods/inheritance, so it fits the
LangSpec + analyzeProjectWith pattern (like the JavaScript/TypeScript analyzers).
Tasks
- Copy
tree-sitter-c_sharp.wasm into public/wasm/.
- Create
src/lib/analysis/analyzers/csharp.ts with a LangSpec: method/local-function defs, classes (class_declaration), calls (invocation_expression), extends/interfaces (base list), and using for imports.
- Register it in
registry.ts and wire EXT/PROJECT_EXTS (.cs), the selector + sample in CodeWorkspace, and the Hero/Features chips.
- Tests in
analyzers.test.ts (cross-file call graph, classes/inheritance, empty graph).
- Update docs (
Languages.tsx) and README (en/es).
Starting point: look at the existing typescript.ts/javascript.ts analyzers (they have classes) and the Rust PR (#77) for the wiring reference.
🇪🇸 Español
Agregar soporte para C# generando un call graph (funciones/métodos como nodos, llamadas como aristas), siguiendo la arquitectura pluggable.
Por qué encaja
node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm— solo hay que copiarlo apublic/wasm/(no hay que compilar nada).LangSpec+analyzeProjectWith(como los analyzers de JavaScript/TypeScript).Tareas
tree-sitter-c_sharp.wasmapublic/wasm/.src/lib/analysis/analyzers/csharp.tscon unLangSpec: definiciones de métodos/funciones locales, clases (class_declaration), llamadas (invocation_expression),extends/interfaces (lista de bases) yusingpara imports.registry.tsy cablearEXT/PROJECT_EXTS(.cs), selector + sample enCodeWorkspace, y los chips de Hero/Features.analyzers.test.ts(call graph entre archivos, clases/herencia, grafo vacío).Languages.tsx) y README (en/es).Punto de partida: mirar los analyzers existentes
typescript.ts/javascript.ts(tienen clases) y el PR de Rust (#77) como referencia del cableado.🇬🇧 English
Add C# support, generating a call graph (functions/methods as nodes, calls as edges), following the pluggable architecture.
Why it fits
node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm— just copy it topublic/wasm/(no build needed).LangSpec+analyzeProjectWithpattern (like the JavaScript/TypeScript analyzers).Tasks
tree-sitter-c_sharp.wasmintopublic/wasm/.src/lib/analysis/analyzers/csharp.tswith aLangSpec: method/local-function defs, classes (class_declaration), calls (invocation_expression),extends/interfaces (base list), andusingfor imports.registry.tsand wireEXT/PROJECT_EXTS(.cs), the selector + sample inCodeWorkspace, and the Hero/Features chips.analyzers.test.ts(cross-file call graph, classes/inheritance, empty graph).Languages.tsx) and README (en/es).Starting point: look at the existing
typescript.ts/javascript.tsanalyzers (they have classes) and the Rust PR (#77) for the wiring reference.