feat(dart): add function call expression highlight

This is a work around since currently the upstream grammar does not
support a call_expression
This commit is contained in:
Akin Sowemimo 2021-07-01 16:55:42 +01:00 committed by Stephan Seitz
parent bd00e4064f
commit 106eb8e500

View file

@ -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