Documentation
¶
Index ¶
Constants ¶
View Source
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()
View Source
const Queries = `` /* 466-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
- 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 — mapped to @variable
- delegate declarations — mapped to @type
View Source
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 ¶
View Source
var Extensions = []string{".cs"}
Extensions lists file extensions handled by the C# grammar.
View Source
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.
Click to show internal directories.
Click to hide internal directories.