Struct lib_ruby_parser::nodes::KwBegin
source · #[repr(C)]pub struct KwBegin {
pub statements: Vec<Node>,
pub begin_l: Option<Loc>,
pub end_l: Option<Loc>,
pub expression_l: Loc,
}
Expand description
Represents an explicit begin; end
block.
The reason why it’s different is that
begin; foo; end while cond
is a post-while loop (same with post-until loop)
Fields§
§statements: Vec<Node>
A list of statements
begin_l: Option<Loc>
Location of the begin
keyword
begin; foo; end
~~~~~
end_l: Option<Loc>
Location of the end
keyword
begin; foo; end
~~~
expression_l: Loc
Location of the full expression
begin; foo; bar
~~~~~~~~~~~~~~~
Trait Implementations§
source§impl PartialEq for KwBegin
impl PartialEq for KwBegin
impl StructuralPartialEq for KwBegin
Auto Trait Implementations§
impl Freeze for KwBegin
impl RefUnwindSafe for KwBegin
impl Send for KwBegin
impl Sync for KwBegin
impl Unpin for KwBegin
impl UnwindSafe for KwBegin
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