pub enum Statement {
Show 18 variants
Return(Option<Expr>, Span),
Break(Span),
Continue(Span),
VariableDecl(VariableDecl, Span),
Assignment(Assignment, Span),
Expression(Expr, Span),
For(ForLoop, Span),
While(WhileLoop, Span),
If(IfStatement, Span),
Extend(ExtendStatement, Span),
RemoveTarget(Span),
SetParamType {
param_name: String,
type_annotation: TypeAnnotation,
span: Span,
},
SetParamValue {
param_name: String,
expression: Expr,
span: Span,
},
SetReturnType {
type_annotation: TypeAnnotation,
span: Span,
},
SetReturnExpr {
expression: Expr,
span: Span,
},
ReplaceBody {
body: Vec<Statement>,
span: Span,
},
ReplaceBodyExpr {
expression: Expr,
span: Span,
},
ReplaceModuleExpr {
expression: Expr,
span: Span,
},
}Variants§
Return(Option<Expr>, Span)
Return statement
Break(Span)
Break statement
Continue(Span)
Continue statement
VariableDecl(VariableDecl, Span)
Variable declaration
Assignment(Assignment, Span)
Assignment
Expression(Expr, Span)
Expression statement
For(ForLoop, Span)
For loop
While(WhileLoop, Span)
While loop
If(IfStatement, Span)
If statement
Extend(ExtendStatement, Span)
Comptime-only type extension directive inside comptime handlers/blocks.
RemoveTarget(Span)
Comptime-only directive to remove the current annotation target.
SetParamType
Comptime-only directive to set a function parameter type.
SetParamValue
Comptime-only directive to set a function parameter default value.
SetReturnType
Comptime-only directive to set a function return type.
SetReturnExpr
Comptime-only directive to set a function return type from an expression evaluated in comptime context.
ReplaceBody
Comptime-only directive to replace a function body.
ReplaceBodyExpr
Comptime-only directive to replace a function body from an expression evaluated in comptime context.
ReplaceModuleExpr
Comptime-only directive to replace a module body from an expression evaluated in comptime context.