From 1221c1bf531910e2395551dc721fd98594220841 Mon Sep 17 00:00:00 2001 From: Chinmay Dalal Date: Mon, 20 Jul 2020 01:05:23 +0530 Subject: [PATCH] java locals.scm - add some more --- queries/java/locals.scm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/queries/java/locals.scm b/queries/java/locals.scm index cb5c5c8d0..f4011d4a9 100644 --- a/queries/java/locals.scm +++ b/queries/java/locals.scm @@ -9,14 +9,26 @@ ;(method_invocation ; name: (identifier) @name) @call +; SCOPES (class_declaration) @scope (method_declaration) @scope -(if_statement) @scope -(for_statement) @scope +; 3 captures for `if` - if+else, if only, else only +(if_statement) @scope +(if_statement + body: (_)) @scope +(if_statement + alternative: (_)) @scope +; 3 captures for`try` - try+catch, try only, catch only +(try_statement) @scope (try_statement body: (_) @scope) (catch_clause) @scope +(for_statement) @scope +(do_statement) @scope +(while_statement) @scope + +; DEFINITIONS (class_declaration name: (identifier) @definition.type) (method_declaration