Enum analisar::aware::ast::Statement[][src]

pub enum Statement<'a> {
    Empty(Span),
    Expression(Expression<'a>),
    Assignment {
        local_span: Option<Span>,
        targets: Vec<ExpListItem<'a>>,
        eq_span: Option<Span>,
        values: Vec<ExpListItem<'a>>,
    },
    Label {
        colons1_span: Span,
        name: Name<'a>,
        colons2_span: Span,
    },
    Break(Span),
    GoTo {
        goto_span: Span,
        label: Name<'a>,
    },
    Do {
        do_span: Span,
        block: Block<'a>,
        end_span: Span,
    },
    While {
        while_span: Span,
        exp: Expression<'a>,
        do_span: Span,
        block: Block<'a>,
        end_span: Span,
    },
    Repeat {
        repeat_span: Span,
        block: Block<'a>,
        until_span: Span,
        exp: Expression<'a>,
    },
    If(If<'a>),
    For(ForLoop<'a>),
    ForIn(ForInLoop<'a>),
    Function {
        local: Option<Span>,
        function: Span,
        name: FuncName<'a>,
        body: FuncBody<'a>,
    },
    Return(RetStatement<'a>),
}

Variants

Empty(Span)
Expression(Expression<'a>)
Assignment

Fields of Assignment

local_span: Option<Span>targets: Vec<ExpListItem<'a>>eq_span: Option<Span>values: Vec<ExpListItem<'a>>
Label

Fields of Label

colons1_span: Spanname: Name<'a>colons2_span: Span
Break(Span)
GoTo

Fields of GoTo

goto_span: Spanlabel: Name<'a>
Do

Fields of Do

do_span: Spanblock: Block<'a>end_span: Span
While

Fields of While

while_span: Spanexp: Expression<'a>do_span: Spanblock: Block<'a>end_span: Span
Repeat

Fields of Repeat

repeat_span: Spanblock: Block<'a>until_span: Spanexp: Expression<'a>
If(If<'a>)
For(ForLoop<'a>)
ForIn(ForInLoop<'a>)
Function

Fields of Function

local: Option<Span>function: Spanname: FuncName<'a>body: FuncBody<'a>
Return(RetStatement<'a>)

Implementations

impl<'a> Statement<'a>[src]

pub fn start(&self) -> Option<usize>[src]

pub fn end(&self) -> Option<usize>[src]

Trait Implementations

impl<'a> Clone for Statement<'a>[src]

impl<'a> Debug for Statement<'a>[src]

impl<'a> PartialEq<Statement<'a>> for Statement<'a>[src]

impl<'a> StructuralPartialEq for Statement<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Statement<'a>[src]

impl<'a> Send for Statement<'a>[src]

impl<'a> Sync for Statement<'a>[src]

impl<'a> Unpin for Statement<'a>[src]

impl<'a> UnwindSafe for Statement<'a>[src]

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.