From 106eb8e5008691a1e1969c213c2d12a350416347 Mon Sep 17 00:00:00 2001 From: Akin Sowemimo Date: Thu, 1 Jul 2021 16:55:42 +0100 Subject: [PATCH] feat(dart): add function call expression highlight This is a work around since currently the upstream grammar does not support a call_expression --- queries/dart/highlights.scm | 6 ++++++ 1 file changed, 6 insertions(+) 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