You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(fsharp): route .fsi files through the dedicated signature grammar
The tree-sitter-fsharp package ships two distinct grammars: LANGUAGE_FSHARP
for .fs / .fsx source files and LANGUAGE_SIGNATURE for .fsi signature
files. Both engines previously routed all three extensions through the
source grammar, so bare `val` declarations in .fsi files surfaced as
ERROR nodes and yielded no symbols.
This change adds a separate `fsharp-signature` language for .fsi:
* native: new `FSharpSignature` LanguageKind wired to LANGUAGE_SIGNATURE
* WASM: new `fsharp-signature` registry entry using
tree-sitter-fsharp_signature.wasm (build script now produces it)
* shared F# extractor handles `value_definition` only when its first
child is the `val` keyword, distinguishing signature `val foo : type`
from source `let foo = ...`
* function vs variable kind is inferred from the type shape; supports
both `function_type` (WASM npm 0.1.0) and `curried_spec` (cargo 0.3.0)
node shapes for engine parity
docs check acknowledged: README's F# row already covers .fs/.fsx/.fsi and
the user-facing language count is unchanged; fsharp-signature is an
internal id that mirrors how ocaml-interface backs .mli files.
Closes#1114
0 commit comments