[−][src]Struct lib_ruby_parser::nodes::If
Represents an if
statement (i.e. if foo; bar; else; baz; end
)
Fields
cond: Box<Node>
Condition given to the if
statement, Lvar("a")
for if a; b; else; c; end
if_true: Option<Box<Node>>
True-branch of the if
statement, Lvar("b")
for if a; b; else; c; end
if_false: Option<Box<Node>>
False-branch of the if
statement, Lvar("c")
for if a; b; else; c; end
keyword_l: Range
Location of the if
keyword
if foo; end
~~
begin_l: Range
Location of the then
keyword
if foo then; end
~~~~
None
if then
keyword is omitted
else_l: Option<Range>
Location of the else
keyword
if foo; else; end
~~~~
None
if there's no else
branch
end_l: Option<Range>
Location of the end
keyword
if foo; end
~~~
expression_l: Range
Location of the full expression
if a then; b; else; c end
~~~~~~~~~~~~~~~~~~~~~~~~~
Trait Implementations
impl Clone for If
[src]
impl Debug for If
[src]
impl PartialEq<If> for If
[src]
impl StructuralPartialEq for If
[src]
Auto Trait Implementations
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> 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, 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>,