From 746c8d27b8a389d1b5806164a554c6c7b1ceb5ce Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Jun 2022 21:42:23 +0200 Subject: [PATCH] Add method tags --- queries/tags.scm | 8 ++++++++ test/tags/methods.tig | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/tags/methods.tig diff --git a/queries/tags.scm b/queries/tags.scm index 89c521d..dc4f953 100644 --- a/queries/tags.scm +++ b/queries/tags.scm @@ -8,4 +8,12 @@ function: (identifier) @name) @reference.call ; }}} +; Methods {{{ +(method_declaration + name: (identifier) @name) @definition.method + +(method_call + method: (identifier) @name) @reference.call +; }}} + ; vim: sw=2 foldmethod=marker diff --git a/test/tags/methods.tig b/test/tags/methods.tig new file mode 100644 index 0000000..d569c95 --- /dev/null +++ b/test/tags/methods.tig @@ -0,0 +1,11 @@ +let + class A { + method meth() = () + /* ^ definition.method */ + } + + object := new A +in + object.meth() + /* ^ reference.call */ +end