Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/fsharp/locals.scm')
-rw-r--r--runtime/queries/fsharp/locals.scm47
1 files changed, 27 insertions, 20 deletions
diff --git a/runtime/queries/fsharp/locals.scm b/runtime/queries/fsharp/locals.scm
index aa36755e..db2291f2 100644
--- a/runtime/queries/fsharp/locals.scm
+++ b/runtime/queries/fsharp/locals.scm
@@ -1,25 +1,32 @@
-; Scopes
-;-------
+(identifier) @local.reference
[
- (ce_expression)
- (module_defn)
- (for_expression)
- (do_expression)
- (fun_expression)
- (function_expression)
- (try_expression)
- (match_expression)
- (elif_expression)
- (if_expression)
+ (namespace)
+ (named_module)
+ (function_or_value_defn)
] @local.scope
-; Definitions
-;------------
-
-(function_or_value_defn) @local.definition
+(value_declaration_left
+ .
+ [
+ (_ (identifier) @local.definition)
+ (_ (_ (identifier) @local.definition))
+ (_ (_ (_ (identifier) @local.definition)))
+ (_ (_ (_ (_ (identifier) @local.definition))))
+ (_ (_ (_ (_ (_ (identifier) @local.definition)))))
+ (_ (_ (_ (_ (_ (_ (identifier) @local.definition))))))
+ ])
-; References
-;-----------
-
-(identifier) @local.reference
+(function_declaration_left
+ .
+ ((_) @local.definition)
+ ((argument_patterns
+ [
+ (_ (identifier) @local.definition)
+ (_ (_ (identifier) @local.definition))
+ (_ (_ (_ (identifier) @local.definition)))
+ (_ (_ (_ (_ (identifier) @local.definition))))
+ (_ (_ (_ (_ (_ (identifier) @local.definition)))))
+ (_ (_ (_ (_ (_ (_ (identifier) @local.definition))))))
+ ])
+ ))