Documentation
¶
Index ¶
Constants ¶
const CallQueries = `` /* 165-byte string literal not displayed */
CallQueries captures direct method and function call sites in C#. Matches:
- plain calls: Foo() / foo()
- member access calls: obj.Method()
const ImportQueries = `` /* 174-byte string literal not displayed */
ImportQueries contains tree-sitter query patterns for C# using directive extraction. Matches using_directive nodes:
- plain using: using System; → path="System", alias=""
- qualified using: using System.Collections; → path="System.Collections", alias=""
- alias using: using Alias = System.Coll...; → path="System.Coll...", alias="Alias"
Each match yields a @path capture (identifier or qualified_name) and an optional @alias capture (the identifier before '=').
const Queries = `` /* 919-byte string literal not displayed */
Queries contains tree-sitter query patterns for C# symbol extraction. Covers:
- class declarations (class Foo)
- struct declarations (struct Foo) — mapped to @class
- record declarations (record Foo, record class Foo, record struct Foo) — mapped to @class
- interface declarations (interface IFoo) — mapped to @interface
- enum declarations (enum Foo) — mapped to @enum
- method declarations — mapped to @method
- constructor declarations — mapped to @function
- property declarations (auto-properties with accessors) — mapped to @variable
- field declarations (bare fields without accessors) — mapped to @variable
- delegate declarations — mapped to @type
const RefQueries = `
(variable_declarator
name: (identifier)
(identifier) @ref)
(assignment_expression
right: (identifier) @ref)
`
RefQueries captures identifiers used as values (not called directly) in:
- local variable declarators: Action a = MyMethod;
- simple assignment: a = MyMethod;
Combined with CallQueries in ExtractCalls so delegates/actions assigned as values are recorded as "used" and do not appear as dead code.
Variables ¶
var Extensions = []string{".cs"}
Extensions lists file extensions handled by the C# grammar.
var Language = tree_sitter.NewLanguage(tree_sitter_csharp.Language())
Language is the single shared tree-sitter language instance for C#.
Functions ¶
This section is empty.
Types ¶
This section is empty.