Enum skiff::ast::AstNode [−][src]
pub enum AstNode {
Show 13 variants
NumberNode(i64),
BoolNode(bool),
VarNode(String),
LetNodeTopLevel(Identifier, Box<Ast>),
LetNode(Identifier, Box<Ast>, Box<Ast>),
IfNode(Vec<(Ast, Ast)>, Box<Ast>),
BinOpNode(BinOp, Box<Ast>, Box<Ast>),
FunCallNode(Box<Ast>, Vec<Ast>),
LambdaNode(Vec<Identifier>, Box<Ast>),
FunctionNode(String, Vec<Identifier>, Option<Type>, Box<Ast>),
DataDeclarationNode(String, Vec<(String, Vec<Identifier>)>),
DataLiteralNode(Discriminant, Vec<Box<Ast>>),
MatchNode(Box<Ast>, Vec<(Pattern, Ast)>),
}
Variants
NumberNode(i64)
(val)
Tuple Fields of NumberNode
0: i64
BoolNode(bool)
(val)
Tuple Fields of BoolNode
0: bool
VarNode(String)
(val)
Tuple Fields of VarNode
0: String
LetNodeTopLevel(Identifier, Box<Ast>)
(id, expr)
Tuple Fields of LetNodeTopLevel
0: Identifier
1: Box<Ast>
LetNode(Identifier, Box<Ast>, Box<Ast>)
(id, expr, body)
Tuple Fields of LetNode
(conditions_and_bodies, alternate)
(operator, operand1, operand2)
(fun_value, arg_list)
LambdaNode(Vec<Identifier>, Box<Ast>)
(param_list, body)
Tuple Fields of LambdaNode
0: Vec<Identifier>
1: Box<Ast>
(function_name, param_list, body)
(data_name, data_Variants)
DataLiteralNode(Discriminant, Vec<Box<Ast>>)
(discriminant, values)
Tuple Fields of DataLiteralNode
0: Discriminant
1: Vec<Box<Ast>>
(expression_to_match, branches)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AstNode
impl UnwindSafe for AstNode
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self