rune/ast/
expr_call.rs
1use crate::ast::prelude::*;
2
3#[test]
4#[cfg(not(miri))]
5fn ast_parse() {
6 rt::<ast::ExprCall>("test()");
7 rt::<ast::ExprCall>("(foo::bar)()");
8}
9
10#[derive(Debug, TryClone, Parse, PartialEq, Eq, ToTokens, Spanned)]
14#[rune(parse = "meta_only")]
15#[non_exhaustive]
16pub struct ExprCall {
17 #[rune(iter, meta)]
19 pub attributes: Vec<ast::Attribute>,
20 #[rune(meta)]
22 pub expr: Box<ast::Expr>,
23 pub args: ast::Parenthesized<ast::Expr, T![,]>,
25 #[rune(skip)]
27 pub(crate) id: ItemId,
28}
29
30expr_parse!(Call, ExprCall, "call expression");