galvan_ast/item/
closure.rs

1use galvan_ast_macro::PrintAst;
2
3use crate::{Block, Expression, Ident, PrintAst, TypeElement};
4
5#[derive(Clone, Debug, PartialEq, Eq, PrintAst)]
6pub struct Closure {
7    pub parameters: Vec<ClosureParameter>,
8    pub block: Block,
9}
10
11#[derive(Clone, Debug, PartialEq, Eq, PrintAst)]
12pub struct ClosureParameter {
13    pub ident: Ident,
14    pub ty: TypeElement,
15}
16
17#[derive(Clone, Debug, PartialEq, Eq, PrintAst)]
18pub struct ElseExpression {
19    pub receiver: Box<Expression>,
20    pub parameters: Vec<ClosureParameter>,
21    pub block: Block,
22}