[−][src]Struct full_moon::ast::NumericFor
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]
index_variable: Cow<'a, TokenReference<'a>>,
start: Expression<'a>,
end: Expression<'a>
) -> Self
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]
self,
index_variable: Cow<'a, TokenReference<'a>>
) -> Self
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]
self,
start_end_comma: Cow<'a, TokenReference<'a>>
) -> Self
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]
self,
end_step_comma: Option<Cow<'a, TokenReference<'a>>>
) -> Self
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]
pub fn clone(&self) -> NumericFor<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for NumericFor<'a>
[src]
impl<'de: 'a, 'a> Deserialize<'de> for NumericFor<'a>
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'_> Display for NumericFor<'_>
[src]
impl<'a> Node<'a> for NumericFor<'a>
[src]
pub fn start_position(&self) -> Option<Position>
[src]
pub fn end_position(&self) -> Option<Position>
[src]
pub fn similar(&self, other: &Self) -> bool
[src]
pub fn tokens<'b>(&'b self) -> Tokens<'a, 'b>ⓘ
[src]
pub fn range(&self) -> Option<(Position, Position)>
[src]
pub fn surrounding_trivia<'b>(
&'b self
) -> (Vec<Cow<'b, Token<'ast>>>, Vec<Cow<'b, Token<'ast>>>)
[src]
&'b self
) -> (Vec<Cow<'b, Token<'ast>>>, Vec<Cow<'b, Token<'ast>>>)
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.
pub fn owned(&self) -> Self::Owned
[src]
impl<'a> PartialEq<NumericFor<'a>> for NumericFor<'a>
[src]
pub fn eq(&self, other: &NumericFor<'a>) -> bool
[src]
pub fn ne(&self, other: &NumericFor<'a>) -> bool
[src]
impl<'a> Serialize for NumericFor<'a>
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralPartialEq for NumericFor<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for NumericFor<'a>
[src]
impl<'a> Send for NumericFor<'a>
[src]
impl<'a> Sync for NumericFor<'a>
[src]
impl<'a> Unpin for NumericFor<'a>
[src]
impl<'a> UnwindSafe for NumericFor<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,