1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use crate::language::{InternSymbol, Access};
use crate::parser::expr::{ExprMeta, ExprBlock};
#[derive(Debug, Clone)]
pub struct FunctionDef {
pub signature: SignatureDef,
pub body: Box<ExprBlock>,
}
#[derive(Debug, Clone)]
pub struct SignatureDef {
pub name: Option<InternSymbol>,
pub required: Box<[ParamDef]>,
pub default: Box<[DefaultDef]>,
pub variadic: Option<ParamDef>,
}
#[derive(Debug, Clone)]
pub struct ParamDef {
pub name: InternSymbol,
pub mode: Access,
}
#[derive(Debug, Clone)]
pub struct DefaultDef {
pub name: InternSymbol,
pub mode: Access,
pub default: Box<ExprMeta>,
}