File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl AstModuleFindCallName for AstModule {
51
51
node : Expr :: Call ( identifier, arguments) ,
52
52
..
53
53
} => {
54
- if let Expr :: Identifier ( _) = & identifier . node {
54
+ if matches ! ( & identifier . node , Expr :: Identifier ( _) | Expr :: Dot ( _ , _ ) ) {
55
55
let found =
56
56
arguments
57
57
. args
@@ -100,6 +100,8 @@ foo(name = "foo_name")
100
100
bar("bar_name")
101
101
baz(name = "baz_name")
102
102
103
+ utils.foo(name = "dot_name")
104
+
103
105
def x(name = "foo_name"):
104
106
pass
105
107
"# ;
@@ -121,6 +123,15 @@ def x(name = "foo_name"):
121
123
. map( |span| module. codemap( ) . resolve_span( span) )
122
124
) ;
123
125
assert_eq ! ( None , module. find_function_call_with_name( "bar_name" ) ) ;
126
+ assert_eq ! (
127
+ Some ( ResolvedSpan {
128
+ begin: ResolvedPos { line: 5 , column: 0 } ,
129
+ end: ResolvedPos { line: 5 , column: 9 }
130
+ } ) ,
131
+ module
132
+ . find_function_call_with_name( "dot_name" )
133
+ . map( |span| module. codemap( ) . resolve_span( span) )
134
+ ) ;
124
135
Ok ( ( ) )
125
136
}
126
137
}
You can’t perform that action at this time.
0 commit comments