[][src]Enum kes::ast::Stmt

pub enum Stmt {
    Assign {
        var: Symbol,
        value: Expr,
        location: Location,
    },
    Print {
        values: Vec<Expr>,
        newline: bool,
        wait: bool,
        location: Location,
    },
    If {
        arms: Vec<(Expr, Vec<Stmt>, Location)>,
        other: Vec<Stmt>,
        other_location: Location,
    },
    While {
        cond: Expr,
        body: Vec<Stmt>,
        location: Location,
    },
    Expression {
        expr: Expr,
        location: Location,
    },
    Exit {
        location: Location,
    },
}

Variants

Assign

Fields of Assign

var: Symbolvalue: Exprlocation: Location
Print

Fields of Print

values: Vec<Expr>newline: boolwait: boollocation: Location
If

Fields of If

arms: Vec<(Expr, Vec<Stmt>, Location)>other: Vec<Stmt>other_location: Location
While

Fields of While

cond: Exprbody: Vec<Stmt>location: Location
Expression

Fields of Expression

expr: Exprlocation: Location
Exit

Fields of Exit

location: Location

Implementations

impl Stmt[src]

pub fn location(&self) -> Location[src]

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

Trait Implementations

impl Clone for Stmt[src]

impl Debug for Stmt[src]

impl Eq for Stmt[src]

impl PartialEq<Stmt> for Stmt[src]

impl StructuralEq for Stmt[src]

impl StructuralPartialEq for Stmt[src]

Auto Trait Implementations

impl RefUnwindSafe for Stmt

impl Send for Stmt

impl Sync for Stmt

impl Unpin for Stmt

impl UnwindSafe for Stmt

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.