[][src]Struct full_moon::ast::NumericFor

pub struct NumericFor<'a> { /* fields omitted */ }

A numeric for loop, such as for index = 1, 10 do end

Implementations

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

pub fn new(
    index_variable: Cow<'a, TokenReference<'a>>,
    start: Expression<'a>,
    end: Expression<'a>
) -> Self
[src]

Creates a new NumericFor from the given index variable, start, and end expressions

pub fn for_token(&self) -> &TokenReference<'a>[src]

The for token

pub fn index_variable(&self) -> &TokenReference<'a>[src]

The index identity, index in the initial example

pub fn equal_token(&self) -> &TokenReference<'a>[src]

The = token

pub fn start(&self) -> &Expression<'a>[src]

The starting point, 1 in the initial example

pub fn start_end_comma(&self) -> &TokenReference<'a>[src]

The comma in between the starting point and end point for _ = 1, 10 do ^

pub fn end(&self) -> &Expression<'a>[src]

The ending point, 10 in the initial example

pub fn end_step_comma(&self) -> Option<&TokenReference<'a>>[src]

The comma in between the ending point and limit, if one exists for _ = 0, 10, 2 do ^

pub fn step(&self) -> Option<&Expression<'a>>[src]

The step if one exists, 2 in for index = 0, 10, 2 do end

pub fn do_token(&self) -> &TokenReference<'a>[src]

The do token

pub fn block(&self) -> &Block<'a>[src]

The code inside the for loop

pub fn end_token(&self) -> &TokenReference<'a>[src]

The end token

pub fn with_for_token(self, for_token: Cow<'a, TokenReference<'a>>) -> Self[src]

Returns a new NumericFor with the given for token

pub fn with_index_variable(
    self,
    index_variable: Cow<'a, TokenReference<'a>>
) -> Self
[src]

Returns a new NumericFor with the given index variable

pub fn with_equal_token(self, equal_token: Cow<'a, TokenReference<'a>>) -> Self[src]

Returns a new NumericFor with the given = token

pub fn with_start(self, start: Expression<'a>) -> Self[src]

Returns a new NumericFor with the given start expression

pub fn with_start_end_comma(
    self,
    start_end_comma: Cow<'a, TokenReference<'a>>
) -> Self
[src]

Returns a new NumericFor with the given comma between the start and end expressions

pub fn with_end(self, end: Expression<'a>) -> Self[src]

Returns a new NumericFor with the given end expression

pub fn with_end_step_comma(
    self,
    end_step_comma: Option<Cow<'a, TokenReference<'a>>>
) -> Self
[src]

Returns a new NumericFor with the given comma between the end and the step expressions

pub fn with_step(self, step: Option<Expression<'a>>) -> Self[src]

Returns a new NumericFor with the given step expression

pub fn with_do_token(self, do_token: Cow<'a, TokenReference<'a>>) -> Self[src]

Returns a new NumericFor with the given do token

pub fn with_block(self, block: Block<'a>) -> Self[src]

Returns a new NumericFor with the given block

pub fn with_end_token(self, end_token: Cow<'a, TokenReference<'a>>) -> Self[src]

Returns a new NumericFor with the given end token

Trait Implementations

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

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

impl<'de: 'a, 'a> Deserialize<'de> for NumericFor<'a>[src]

impl<'a> Display for NumericFor<'a>[src]

impl<'a> Node<'a> for NumericFor<'a>[src]

impl<'a> Owned for NumericFor<'a>[src]

type Owned = NumericFor<'static>

What an owned version of the object looks like. Usually contains a 'static lifetime.

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

impl<'a> Serialize for NumericFor<'a>[src]

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for NumericFor<'a>

impl<'a> Send for NumericFor<'a>

impl<'a> Sync for NumericFor<'a>

impl<'a> Unpin for NumericFor<'a>

impl<'a> UnwindSafe for NumericFor<'a>

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> ToString for T where
    T: Display + ?Sized
[src]

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.