diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index b4c647f2654..7fafb26bbb3 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -185,8 +185,15 @@ class _: ``` """ +class FunctionOrMethodCallExpr(Expr): + """ + A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. + """ + arg_list: optional["ArgList"] | child + attrs: list["Attr"] | child -@annotate(CallExpr) + +@annotate(CallExpr, replace_bases={Expr: FunctionOrMethodCallExpr}) class _: """ A function call expression. For example: @@ -197,9 +204,10 @@ class _: foo(1) = 4; ``` """ + arg_list: drop + attrs: drop - -@annotate(MethodCallExpr) +@annotate(MethodCallExpr, replace_bases={Expr: FunctionOrMethodCallExpr}) class _: """ A method call expression. For example: @@ -208,6 +216,8 @@ class _: x.foo::(42); ``` """ + arg_list: drop + attrs: drop @annotate(MatchArm)