Struct ruby_prism::WhileNode
source · pub struct WhileNode<'pr> { /* private fields */ }
Expand description
Represents the use of the while
keyword, either in the block form or the modifier form.
bar while foo
^^^^^^^^^^^^^
while foo do bar end
^^^^^^^^^^^^^^^^^^^^
Implementations§
source§impl<'pr> WhileNode<'pr>
impl<'pr> WhileNode<'pr>
sourcepub fn flags(&self) -> pm_node_flags_t
pub fn flags(&self) -> pm_node_flags_t
Returns the flags of this node.
sourcepub fn is_begin_modifier(&self) -> bool
pub fn is_begin_modifier(&self) -> bool
a loop after a begin statement, so the body is executed first before the condition
sourcepub fn keyword_loc(&self) -> Location<'pr>
pub fn keyword_loc(&self) -> Location<'pr>
Returns the keyword_loc
param
sourcepub fn do_keyword_loc(&self) -> Option<Location<'pr>>
pub fn do_keyword_loc(&self) -> Option<Location<'pr>>
Returns the do_keyword_loc
param
sourcepub fn closing_loc(&self) -> Option<Location<'pr>>
pub fn closing_loc(&self) -> Option<Location<'pr>>
Returns the closing_loc
param
sourcepub fn statements(&self) -> Option<StatementsNode<'pr>>
pub fn statements(&self) -> Option<StatementsNode<'pr>>
Returns the statements
param
Trait Implementations§
Auto Trait Implementations§
impl<'pr> RefUnwindSafe for WhileNode<'pr>
impl<'pr> !Send for WhileNode<'pr>
impl<'pr> !Sync for WhileNode<'pr>
impl<'pr> Unpin for WhileNode<'pr>
impl<'pr> !UnwindSafe for WhileNode<'pr>
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