Lyricdev
GitHub

enum Stmt

pub enum Stmt :: [Debug]

Conforms to Debug.

A statement, each form a variant. A loop carries its label, if any; a Let is var by its first flag and using let by its last.

Variants

Expr(Expr, Span)
Tail(Expr, Span)
Let(bool, Ident, ?Type, ?Expr, bool, Span)
LetPattern(bool, Pattern, ?Type, Expr, ?Block, Span)
If(Expr, Block, ?Box<Stmt>, bool, Span)
While(Expr, Block, ?string, Span)
DoWhile(Block, Expr, ?string, Span)
For(Ident, ?Pattern, Expr, Block, bool, ?string, Span)
Break(?string, ?Expr, Span)
Continue(?string, Span)
Return(?Expr, Span)
Yield(?Expr, Span)
Defer(Box<Stmt>, Span)
Throw(Expr, Span)
Match(Expr, Arm[], Span)
Try(Block, Catch[], Span)
Block(Block, Span)

Methods

pub fn span(): Span

Returns where this statement stands.

pub fn toSource(): string
pub fn children(): Node[]

Returns the nodes directly inside this one, in source order.