pub struct Literal { /* private fields */ }Expand description
A Literal node (family.ungram rule Literal).
Implementations§
Source§impl Literal
impl Literal
pub fn minus_token(&self) -> Option<SyntaxToken>
pub fn int_number_token(&self) -> Option<SyntaxToken>
pub fn float_number_token(&self) -> Option<SyntaxToken>
pub fn string_lit_token(&self) -> Option<SyntaxToken>
pub fn true_token(&self) -> Option<SyntaxToken>
pub fn false_token(&self) -> Option<SyntaxToken>
pub fn regex_token(&self) -> Option<SyntaxToken>
pub fn ident_token(&self) -> Option<SyntaxToken>
Trait Implementations§
Source§impl AstNode for Literal
impl AstNode for Literal
Source§fn cast(syntax: SyntaxNode) -> Option<Self>
fn cast(syntax: SyntaxNode) -> Option<Self>
Wraps
syntax if its kind matches this type; None otherwise.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
The underlying untyped node.
impl Eq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl !RefUnwindSafe for Literal
impl !Send for Literal
impl !Sync for Literal
impl !UnwindSafe for Literal
impl Freeze for Literal
impl Unpin for Literal
impl UnsafeUnpin for Literal
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