Enum lucia_lang::token::LiteralKind
source · pub enum LiteralKind {
Int(Result<i64>),
Float(Result<f64>),
Str(Result<String>),
}Expand description
Enum representing literal types, included wrong literal like unterminated string.
Variants§
Int(Result<i64>)
“12”, “0o100”, “0b110”
Float(Result<f64>)
“12.34”, “0b100.100”
Str(Result<String>)
““abc”“, ““abc”
Trait Implementations§
source§impl Clone for LiteralKind
impl Clone for LiteralKind
source§fn clone(&self) -> LiteralKind
fn clone(&self) -> LiteralKind
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 LiteralKind
impl Debug for LiteralKind
source§impl Display for LiteralKind
impl Display for LiteralKind
source§impl PartialEq<LiteralKind> for LiteralKind
impl PartialEq<LiteralKind> for LiteralKind
source§fn eq(&self, other: &LiteralKind) -> bool
fn eq(&self, other: &LiteralKind) -> bool
This method tests for
self and other values to be equal, and is used
by ==.