Add class tags
This commit is contained in:
parent
746c8d27b8
commit
c9efe870ab
|
@ -8,6 +8,19 @@
|
|||
function: (identifier) @name) @reference.call
|
||||
; }}}
|
||||
|
||||
; Class {{{
|
||||
(class_declaration
|
||||
name: (identifier) @name) @definition.class
|
||||
(type_declaration
|
||||
name: (identifier) @name
|
||||
(class_type)) @definition.class
|
||||
|
||||
(new_expression
|
||||
class: (type_identifier) @name) @reference.class
|
||||
(extends_qualifier
|
||||
super: (type_identifier) @name) @reference.class
|
||||
; }}}
|
||||
|
||||
; Methods {{{
|
||||
(method_declaration
|
||||
name: (identifier) @name) @definition.method
|
||||
|
|
9
test/tags/classes.tig
Normal file
9
test/tags/classes.tig
Normal file
|
@ -0,0 +1,9 @@
|
|||
class A {}
|
||||
/* ^ definition.class */
|
||||
|
||||
type B = class extends A {}
|
||||
/* ^ definition.class */
|
||||
/* ^ reference.class */
|
||||
|
||||
var object := new B
|
||||
/* ^ reference.class */
|
Loading…
Reference in a new issue