aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--queries/dart/highlights.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/queries/dart/highlights.scm b/queries/dart/highlights.scm
index 3e23d6555..d873c9e52 100644
--- a/queries/dart/highlights.scm
+++ b/queries/dart/highlights.scm
@@ -3,11 +3,17 @@
; Methods
; --------------------
(super) @function
+
; TODO: add method/call_expression to grammar and
; distinguish method call from variable access
(function_expression_body (identifier) @function)
; ((identifier)(selector (argument_part)) @function)
+; NOTE: This query is a bit of a work around for the fact that the dart grammar doesn't
+; specifically identify a node as a function call
+(((identifier) @function (#match? @function "^_?[a-z]"))
+ . (selector . (argument_part))) @function
+
; Annotations
; --------------------
(annotation