Enum xswag_syntax_java::lex::Lit
[−]
[src]
pub enum Lit {
Str(String),
Char(char),
Integer {
raw: String,
is_long: bool,
radix: u8,
},
Float {
raw: String,
is_double: bool,
radix: u8,
exp: String,
},
Null,
Bool(bool),
}A Java literal
Variants
Str(String)String literal, e.g. "hi"
Char(char)Char literal, e.g. 'x'
IntegerInteger literal, e.g. 0x27l
Fields of Integer
raw: String | Literal as occured in source code (without type suffix and radix indicators) |
is_long: bool | If |
radix: u8 | Detected radix |
FloatFloating point literal, e.g. 3.14e3f
Fields of Float
raw: String | Float number without radix indicators |
is_double: bool | If the |
radix: u8 | Detected radix |
exp: String | Exponent part without type suffix |
NullNull literal null
Bool(bool)Boolean literal true or false
Methods
impl Lit[src]
fn as_java_string(&self) -> &str
String for error reporting. Example:
Excpected one of `,` `;` `)`
Trait Implementations
impl Debug for Lit[src]
impl Clone for Lit[src]
fn clone(&self) -> Lit
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl PartialEq for Lit[src]
fn eq(&self, __arg_0: &Lit) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Lit) -> bool
This method tests for !=.