[][src]Enum dora_parser::ast::Stmt

pub enum Stmt {
    StmtVar(StmtVarType),
    StmtWhile(StmtWhileType),
    StmtLoop(StmtLoopType),
    StmtIf(StmtIfType),
    StmtExpr(StmtExprType),
    StmtBlock(StmtBlockType),
    StmtBreak(StmtBreakType),
    StmtContinue(StmtContinueType),
    StmtReturn(StmtReturnType),
    StmtThrow(StmtThrowType),
    StmtDefer(StmtDeferType),
    StmtDo(StmtDoType),
    StmtFor(StmtForType),
}

Variants

StmtVar(StmtVarType)
StmtWhile(StmtWhileType)
StmtLoop(StmtLoopType)
StmtIf(StmtIfType)
StmtExpr(StmtExprType)
StmtBlock(StmtBlockType)
StmtBreak(StmtBreakType)
StmtContinue(StmtContinueType)
StmtReturn(StmtReturnType)
StmtThrow(StmtThrowType)
StmtDefer(StmtDeferType)
StmtDo(StmtDoType)
StmtFor(StmtForType)

Methods

impl Stmt[src]

pub fn create_var(
    id: NodeId,
    pos: Position,
    span: Span,
    name: Name,
    reassignable: bool,
    data_type: Option<Type>,
    expr: Option<Box<Expr>>
) -> Stmt
[src]

pub fn create_for(
    id: NodeId,
    pos: Position,
    span: Span,
    name: Name,
    expr: Box<Expr>,
    block: Box<Stmt>
) -> Stmt
[src]

pub fn create_while(
    id: NodeId,
    pos: Position,
    span: Span,
    cond: Box<Expr>,
    block: Box<Stmt>
) -> Stmt
[src]

pub fn create_loop(
    id: NodeId,
    pos: Position,
    span: Span,
    block: Box<Stmt>
) -> Stmt
[src]

pub fn create_if(
    id: NodeId,
    pos: Position,
    span: Span,
    cond: Box<Expr>,
    then_block: Box<Stmt>,
    else_block: Option<Box<Stmt>>
) -> Stmt
[src]

pub fn create_expr(
    id: NodeId,
    pos: Position,
    span: Span,
    expr: Box<Expr>
) -> Stmt
[src]

pub fn create_block(
    id: NodeId,
    pos: Position,
    span: Span,
    stmts: Vec<Box<Stmt>>
) -> Stmt
[src]

pub fn create_break(id: NodeId, pos: Position, span: Span) -> Stmt[src]

pub fn create_continue(id: NodeId, pos: Position, span: Span) -> Stmt[src]

pub fn create_return(
    id: NodeId,
    pos: Position,
    span: Span,
    expr: Option<Box<Expr>>
) -> Stmt
[src]

pub fn create_throw(
    id: NodeId,
    pos: Position,
    span: Span,
    expr: Box<Expr>
) -> Stmt
[src]

pub fn create_defer(
    id: NodeId,
    pos: Position,
    span: Span,
    expr: Box<Expr>
) -> Stmt
[src]

pub fn create_do(
    id: NodeId,
    pos: Position,
    span: Span,
    do_block: Box<Stmt>,
    catch_blocks: Vec<CatchBlock>,
    finally_block: Option<FinallyBlock>
) -> Stmt
[src]

pub fn id(&self) -> NodeId[src]

pub fn pos(&self) -> Position[src]

pub fn span(&self) -> Span[src]

pub fn to_throw(&self) -> Option<&StmtThrowType>[src]

pub fn is_throw(&self) -> bool[src]

pub fn to_defer(&self) -> Option<&StmtDeferType>[src]

pub fn is_defer(&self) -> bool[src]

pub fn to_do(&self) -> Option<&StmtDoType>[src]

pub fn is_try(&self) -> bool[src]

pub fn to_var(&self) -> Option<&StmtVarType>[src]

pub fn is_var(&self) -> bool[src]

pub fn to_while(&self) -> Option<&StmtWhileType>[src]

pub fn is_while(&self) -> bool[src]

pub fn to_for(&self) -> Option<&StmtForType>[src]

pub fn is_for(&self) -> bool[src]

pub fn to_loop(&self) -> Option<&StmtLoopType>[src]

pub fn is_loop(&self) -> bool[src]

pub fn to_if(&self) -> Option<&StmtIfType>[src]

pub fn is_if(&self) -> bool[src]

pub fn to_expr(&self) -> Option<&StmtExprType>[src]

pub fn is_expr(&self) -> bool[src]

pub fn to_block(&self) -> Option<&StmtBlockType>[src]

pub fn is_block(&self) -> bool[src]

pub fn to_return(&self) -> Option<&StmtReturnType>[src]

pub fn is_return(&self) -> bool[src]

pub fn to_break(&self) -> Option<&StmtBreakType>[src]

pub fn is_break(&self) -> bool[src]

pub fn to_continue(&self) -> Option<&StmtContinueType>[src]

pub fn is_continue(&self) -> bool[src]

Trait Implementations

impl Clone for Stmt[src]

impl Debug for Stmt[src]

Auto Trait Implementations

impl Send for Stmt

impl Sync for Stmt

impl Unpin for Stmt

impl UnwindSafe for Stmt

impl RefUnwindSafe for Stmt

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T