Skip to content

Commit 6015524

Browse files
author
Paolo Tranquilli
committed
Rust: insert FunctionOrMethodCallExpr in annotations
1 parent c364fd7 commit 6015524

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

rust/schema/annotations.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,15 @@ class _:
185185
```
186186
"""
187187

188+
class FunctionOrMethodCallExpr(Expr):
189+
"""
190+
A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details.
191+
"""
192+
arg_list: optional["ArgList"] | child
193+
attrs: list["Attr"] | child
188194

189-
@annotate(CallExpr)
195+
196+
@annotate(CallExpr, replace_bases={Expr: FunctionOrMethodCallExpr})
190197
class _:
191198
"""
192199
A function call expression. For example:
@@ -197,9 +204,10 @@ class _:
197204
foo(1) = 4;
198205
```
199206
"""
207+
arg_list: drop
208+
attrs: drop
200209

201-
202-
@annotate(MethodCallExpr)
210+
@annotate(MethodCallExpr, replace_bases={Expr: FunctionOrMethodCallExpr})
203211
class _:
204212
"""
205213
A method call expression. For example:
@@ -208,6 +216,8 @@ class _:
208216
x.foo::<u32, u64>(42);
209217
```
210218
"""
219+
arg_list: drop
220+
attrs: drop
211221

212222

213223
@annotate(MatchArm)

0 commit comments

Comments
 (0)