#[repr(C)]pub struct pm_unless_node {
pub base: pm_node_t,
pub keyword_loc: pm_location_t,
pub predicate: *mut pm_node,
pub then_keyword_loc: pm_location_t,
pub statements: *mut pm_statements_node,
pub else_clause: *mut pm_else_node,
pub end_keyword_loc: pm_location_t,
}
Expand description
UnlessNode
Represents the use of the unless
keyword, either in the block form or the modifier form.
bar unless foo
^^^^^^^^^^^^^^
unless foo then bar end
^^^^^^^^^^^^^^^^^^^^^^^
Type: ::PM_UNLESS_NODE
@extends pm_node_t
Fields§
§base: pm_node_t
The embedded base node.
keyword_loc: pm_location_t
UnlessNode#keyword_loc
The location of the unless
keyword.
unless cond then bar end
^^^^^^
bar unless cond
^^^^^^
predicate: *mut pm_node
UnlessNode#predicate
The condition to be evaluated for the unless expression. It can be any non-void expression.
unless cond then bar end
^^^^
bar unless cond
^^^^
then_keyword_loc: pm_location_t
UnlessNode#then_keyword_loc
The location of the then
keyword, if present.
unless cond then bar end
^^^^
statements: *mut pm_statements_node
UnlessNode#statements
The body of statements that will executed if the unless condition is
falsey. Will be nil
if no body is provided.
unless cond then bar end
^^^
else_clause: *mut pm_else_node
UnlessNode#else_clause
The else clause of the unless expression, if present.
unless cond then bar else baz end
^^^^^^^^
end_keyword_loc: pm_location_t
UnlessNode#end_keyword_loc
The location of the end
keyword, if present.
unless cond then bar end
^^^
Trait Implementations§
Source§impl Clone for pm_unless_node
impl Clone for pm_unless_node
Source§fn clone(&self) -> pm_unless_node
fn clone(&self) -> pm_unless_node
Returns a copy 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 Debug for pm_unless_node
impl Debug for pm_unless_node
Source§impl Default for pm_unless_node
impl Default for pm_unless_node
impl Copy for pm_unless_node
Auto Trait Implementations§
impl Freeze for pm_unless_node
impl RefUnwindSafe for pm_unless_node
impl !Send for pm_unless_node
impl !Sync for pm_unless_node
impl Unpin for pm_unless_node
impl UnwindSafe for pm_unless_node
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