diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2025-11-19 10:53:56 +0100 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2025-11-19 11:03:04 +0100 |
| commit | bb83a676128d95c865e40ba71376d883bdadec14 (patch) | |
| tree | c2f3e7572f860d3512c0e4e7df3efff2434c5a13 | |
| parent | feat(parsers): update asm, c_sharp, csv, desktop, gdshader, gotmpl, haskell, ... (diff) | |
| download | nvim-treesitter-bb83a676128d95c865e40ba71376d883bdadec14.tar nvim-treesitter-bb83a676128d95c865e40ba71376d883bdadec14.tar.gz nvim-treesitter-bb83a676128d95c865e40ba71376d883bdadec14.tar.bz2 nvim-treesitter-bb83a676128d95c865e40ba71376d883bdadec14.tar.lz nvim-treesitter-bb83a676128d95c865e40ba71376d883bdadec14.tar.xz nvim-treesitter-bb83a676128d95c865e40ba71376d883bdadec14.tar.zst nvim-treesitter-bb83a676128d95c865e40ba71376d883bdadec14.zip | |
fix(fsharp): correct use of supertypes in `(_type)` patterns
Problem: These patterns were impossible, since children need to be children of
every subtype of a supertype to be captured in this way. As subtypes
could appear as children themselves, the query code silently "skipped
over" the supertype restriction in the pattern. This was fixed in
tree-sitter v0.26.0, which now (correctly) flags these patterns as
"impossible".
Solution: Add the appropriate child nodes explicitly.
| -rw-r--r-- | runtime/queries/fsharp/highlights.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/queries/fsharp/highlights.scm b/runtime/queries/fsharp/highlights.scm index 16b969fb6..ba70ea5c6 100644 --- a/runtime/queries/fsharp/highlights.scm +++ b/runtime/queries/fsharp/highlights.scm @@ -376,8 +376,9 @@ (unit) @function.call) ((_type - (long_identifier - (identifier) @type.builtin)) + (simple_type + (long_identifier + (identifier) @type.builtin))) (#any-of? @type.builtin "bool" "byte" "sbyte" "int16" "uint16" "int" "uint" "int64" "uint64" "nativeint" "unativeint" "decimal" "float" "double" "float32" "single" "char" "string" "unit")) @@ -401,8 +402,9 @@ (attributes (attribute (_type - (long_identifier - (identifier) @attribute)))) + (simple_type + (long_identifier + (identifier) @attribute))))) (function_or_value_defn (value_declaration_left . |
