Struct lib_ruby_parser::nodes::SClass
source · #[repr(C)]pub struct SClass {
pub expr: Box<Node>,
pub body: Option<Box<Node>>,
pub keyword_l: Loc,
pub operator_l: Loc,
pub end_l: Loc,
pub expression_l: Loc,
}
Expand description
Represents opening a singleton class (i.e. class << foo; ... end;
)
Fields§
§expr: Box<Node>
Expression that is used to get a singleton class
Lvar("foo")
for class << foo; end
body: Option<Box<Node>>
Body of the block
keyword_l: Loc
Location of the class
keyword
class << foo; end
~~~~~
operator_l: Loc
Location of the <<
operator
class << foo; end
~~
end_l: Loc
Location of the end
keyword
class << foo; end
~~~
expression_l: Loc
Location of the full expression
class << foo; end
~~~~~~~~~~~~~~~~~
Trait Implementations§
source§impl PartialEq for SClass
impl PartialEq for SClass
impl StructuralPartialEq for SClass
Auto Trait Implementations§
impl Freeze for SClass
impl RefUnwindSafe for SClass
impl Send for SClass
impl Sync for SClass
impl Unpin for SClass
impl UnwindSafe for SClass
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