pub struct NumericalFor<'a> {
pub for_: TokenReference<'a>,
pub name: Name<'a>,
pub assign: TokenReference<'a>,
pub from: Box<Expr<'a>>,
pub comma: TokenReference<'a>,
pub to: Box<Expr<'a>>,
pub step: Option<(TokenReference<'a>, Box<Expr<'a>>)>,
pub do_: TokenReference<'a>,
pub block: Box<Block<'a>>,
pub end: TokenReference<'a>,
}Expand description
A numerical for loop:
for name = from, to, step do
...
endFields§
§for_: TokenReference<'a>A reference to the Symbol::For token.
name: Name<'a>The loop variable name.
assign: TokenReference<'a>A reference to the Symbol::Assign token.
from: Box<Expr<'a>>The initial value.
comma: TokenReference<'a>A reference to the Symbol::Comma token that follows the initial value expression.
to: Box<Expr<'a>>The end value.
step: Option<(TokenReference<'a>, Box<Expr<'a>>)>A reference to the Symbol::Comma token that follows the end value expression, as well as
the expression that evaluates to the increment step.
do_: TokenReference<'a>A reference to the Symbol::Do token.
block: Box<Block<'a>>The body loop.
end: TokenReference<'a>A reference to the Symbol::End token.
Trait Implementations§
Source§impl<'a> AstDescend<'a> for NumericalFor<'a>
impl<'a> AstDescend<'a> for NumericalFor<'a>
fn descend_mut<T: VisitorMut<'a>>(&mut self, visitor: &mut T)
Source§impl<'a> Clone for NumericalFor<'a>
impl<'a> Clone for NumericalFor<'a>
Source§fn clone(&self) -> NumericalFor<'a>
fn clone(&self) -> NumericalFor<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for NumericalFor<'a>
impl<'a> Debug for NumericalFor<'a>
Source§impl Display for NumericalFor<'_>
impl Display for NumericalFor<'_>
Auto Trait Implementations§
impl<'a> Freeze for NumericalFor<'a>
impl<'a> RefUnwindSafe for NumericalFor<'a>
impl<'a> Send for NumericalFor<'a>
impl<'a> Sync for NumericalFor<'a>
impl<'a> Unpin for NumericalFor<'a>
impl<'a> UnwindSafe for NumericalFor<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more