tags: Add @ignore capture
This commit is contained in:
parent
4ec7d80968
commit
e89a19a158
2 changed files with 153 additions and 109 deletions
|
|
@ -68,11 +68,13 @@ const JS_TAG_QUERY: &'static str = r#"
|
|||
|
||||
const RUBY_TAG_QUERY: &'static str = r#"
|
||||
(method
|
||||
name: (identifier) @name) @definition.method
|
||||
name: (_) @name) @definition.method
|
||||
|
||||
(method_call
|
||||
method: (identifier) @name) @reference.call
|
||||
|
||||
(setter (identifier) @ignore)
|
||||
|
||||
((identifier) @name @reference.call
|
||||
(#is-not? local))
|
||||
"#;
|
||||
|
|
@ -207,7 +209,7 @@ fn test_tags_ruby() {
|
|||
"
|
||||
b = 1
|
||||
|
||||
def foo()
|
||||
def foo=()
|
||||
c = 1
|
||||
|
||||
# a is a method because it is not in scope
|
||||
|
|
@ -239,7 +241,7 @@ fn test_tags_ruby() {
|
|||
))
|
||||
.collect::<Vec<_>>(),
|
||||
&[
|
||||
("foo", "method", (2, 4)),
|
||||
("foo=", "method", (2, 4)),
|
||||
("bar", "call", (7, 4)),
|
||||
("a", "call", (7, 8)),
|
||||
("b", "call", (7, 11)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue