Skip to content

Commit

Permalink
feat(scala): add in local variables queries
Browse files Browse the repository at this point in the history
This syncs the queries that were updated in tree-sitter/tree-sitter-scala#196.

Co-authored-by: ghostbuster91 <[email protected]>
  • Loading branch information
2 people authored and amaanq committed Mar 27, 2023
1 parent e559b6f commit 25dd24e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions queries/scala/locals.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
; Scopes

[
(template_body)
(lambda_expression)
(function_declaration)
] @scope

; References

(identifier) @reference

; Definitions

(function_declaration
name: (identifier) @definition.function)

(function_definition
name: (identifier) @definition.function)

(parameter
name: (identifier) @definition.parameter)

(binding
name: (identifier) @definition.var)

(val_definition
pattern: (identifier) @definition.var)

(var_definition
pattern: (identifier) @definition.var)

(val_declaration
name: (identifier) @definition.var)

(var_declaration
name: (identifier) @definition.var)

0 comments on commit 25dd24e

Please sign in to comment.