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'

Integer

Integer literal, e.g. 0x27l

Fields

raw: String

Literal as occured in source code (without type suffix and radix indicators)

is_long: bool

If l type suffix was used.

radix: u8

Detected radix

Float

Floating point literal, e.g. 3.14e3f

Fields

raw: String

Float number without radix indicators

is_double: bool

If the f was NOT used

radix: u8

Detected radix

exp: String

Exponent part without type suffix

Null

Null literal null

Bool(bool)

Boolean literal true or false

Trait Implementations

impl Eq for Lit
[src]

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 !=.

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 Debug for Lit
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.