From d446b5d635f5ec9f1acdb07f6431109ca61ced9e Mon Sep 17 00:00:00 2001 From: Chinmay Dalal Date: Mon, 20 Jul 2020 22:08:34 +0530 Subject: [PATCH] java locals.scm - some more --- queries/java/locals.scm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/queries/java/locals.scm b/queries/java/locals.scm index e8e2bce03..465d1b527 100644 --- a/queries/java/locals.scm +++ b/queries/java/locals.scm @@ -1,27 +1,32 @@ ; SCOPES (class_declaration body: (_) @scope) +(enum_declaration + body: (_) @scope) (method_declaration) @scope (block) @scope -; 3 captures for `if` - if+else, if only, else only (if_statement) @scope (if_statement - body: (_) @scope) + consequence: (_) @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 +(do_statement + body: (_) @scope) (while_statement) @scope +(while_statement + body: (_) @scope) +(for_statement) @scope +(for_statement + body: (_) @scope) ; DEFINITIONS (class_declaration name: (identifier) @definition.class) +(enum_declaration + name: (identifier) @definition.enum) (method_declaration name: (identifier) @definition.method) (local_variable_declaration