java locals.scm - fix class definition and scope

This commit is contained in:
Chinmay Dalal 2020-07-20 01:25:29 +05:30 committed by GitHub
parent 329128c47d
commit 7704e51277
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
; CREDITS @maxbrunsfeld (maxbrunsfeld@gmail.com) ; CREDITS @maxbrunsfeld (maxbrunsfeld@gmail.com)
;(class_declaration ;(class_declaration
; name: (identifier) @name) @class ; name: (identifier) @name) @definticlass
; ;
;(method_declaration ;(method_declaration
; name: (identifier) @name) @method ; name: (identifier) @name) @method
@ -10,7 +10,8 @@
; name: (identifier) @name) @call ; name: (identifier) @name) @call
; SCOPES ; SCOPES
(class_declaration) @scope (class_declaration
body: (_)) @scope
(method_declaration) @scope (method_declaration) @scope
(block) @scope (block) @scope
; 3 captures for `if` - if+else, if only, else only ; 3 captures for `if` - if+else, if only, else only
@ -31,6 +32,6 @@
; DEFINITIONS ; DEFINITIONS
(class_declaration (class_declaration
name: (identifier) @definition.type) name: (identifier) @definition.class)
(method_declaration (method_declaration
name: (identifier) @definition.method) name: (identifier) @definition.method)