|
|
@ -1,11 +1,6 @@
|
|
|
|
; Class
|
|
|
|
; Class and Modules
|
|
|
|
(class) @class.around
|
|
|
|
(class
|
|
|
|
|
|
|
|
body: (_)? @class.inside) @class.around
|
|
|
|
(class [(constant) (scope_resolution)] !superclass
|
|
|
|
|
|
|
|
(_)+ @class.inside)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(class [(constant) (scope_resolution)] (superclass)
|
|
|
|
|
|
|
|
(_)+ @class.inside)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(singleton_class
|
|
|
|
(singleton_class
|
|
|
|
value: (_)
|
|
|
|
value: (_)
|
|
|
@ -17,37 +12,32 @@
|
|
|
|
(#match? @class_const "Class")
|
|
|
|
(#match? @class_const "Class")
|
|
|
|
(#match? @class_method "new")
|
|
|
|
(#match? @class_method "new")
|
|
|
|
(do_block (_)+ @class.inside)) @class.around
|
|
|
|
(do_block (_)+ @class.inside)) @class.around
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module
|
|
|
|
|
|
|
|
body: (_)? @class.inside) @class.around
|
|
|
|
|
|
|
|
|
|
|
|
; Functions
|
|
|
|
; Functions and Blocks
|
|
|
|
(method) @function.around
|
|
|
|
(singleton_method
|
|
|
|
|
|
|
|
body: (_)? @function.inside) @function.around
|
|
|
|
|
|
|
|
|
|
|
|
(method (identifier) (method_parameters)
|
|
|
|
(method
|
|
|
|
(_)+ @function.inside)
|
|
|
|
body: (_)? @function.inside) @function.around
|
|
|
|
|
|
|
|
|
|
|
|
(do_block !parameters
|
|
|
|
(do_block
|
|
|
|
(_)+ @function.inside)
|
|
|
|
body: (_)? @function.inside) @function.around
|
|
|
|
|
|
|
|
|
|
|
|
(do_block (block_parameters)
|
|
|
|
(block
|
|
|
|
(_)+ @function.inside)
|
|
|
|
body: (_)? @function.inside) @function.around
|
|
|
|
|
|
|
|
|
|
|
|
(block (block_parameters)
|
|
|
|
|
|
|
|
(_)+ @function.inside)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(block !parameters
|
|
|
|
|
|
|
|
(_)+ @function.inside)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(method (identifier) !parameters
|
|
|
|
|
|
|
|
(_)+ @function.inside)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Parameters
|
|
|
|
; Parameters
|
|
|
|
(method_parameters
|
|
|
|
(method_parameters
|
|
|
|
(_) @parameter.inside)
|
|
|
|
(_) @parameter.inside) @parameter.around
|
|
|
|
|
|
|
|
|
|
|
|
(block_parameters
|
|
|
|
(block_parameters
|
|
|
|
(_) @parameter.inside)
|
|
|
|
(_) @parameter.inside) @parameter.around
|
|
|
|
|
|
|
|
|
|
|
|
(lambda_parameters
|
|
|
|
(lambda_parameters
|
|
|
|
(_) @parameter.inside)
|
|
|
|
(_) @parameter.inside) @parameter.around
|
|
|
|
|
|
|
|
|
|
|
|
; Comments
|
|
|
|
; Comments
|
|
|
|
(comment) @comment.inside
|
|
|
|
(comment) @comment.inside
|
|
|
|