Languages / F# · Edit queries/tags.scm
Tier 2 · Declarative tags.scmF#
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-fsharp/queries/tags.scm. Compiles once at startup, validates captures against the Tier-2 vocabulary gate, and extracts symbols, container hierarchy (Container::member), imports, and call edges.
- Grammar Crate
- tree-sitter-fsharp
- Plugin
- QueryLanguagePlugin (rgctl-lang-fsharp)
- Extensions
- .fs, .fsi, .fsx
- Discover
- rgctl discover . -l fsharp
- Function Kinds
- function_or_value_defn
- Class / Container Kinds
- type_definition
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @definition.class | 1 | Emits SymbolType::Class (acts as enclosing container). |
| @definition.function | 1 | Emits SymbolType::Function (acts as caller scope & container). |
| @definition.module | 1 | Emits SymbolType::Module (acts as enclosing container). |
| @import.path | 1 | Emits SymbolType::Import with normalized import_path metadata. |
| @name | 4 | Symbol identifier or target callee/type name. |
| @reference.call | 1 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-fsharp/queries/tags.scm)
; Tier-2 F# tags for rgctl.
(function_or_value_defn
(function_declaration_left
. (identifier) @name)) @definition.function
(module_defn
(identifier) @name) @definition.module
(type_definition
(_
(type_name
type_name: (_) @name))) @definition.class
(import_decl
(long_identifier) @import.path)
(application_expression
. (long_identifier_or_op) @name) @reference.call
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing