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

String literal, e.g. "hi"

Char literal, e.g. 'x'

Integer literal, e.g. 0x27l

Fields of Integer

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

If l type suffix was used.

Detected radix

Floating point literal, e.g. 3.14e3f

Fields of Float

Float number without radix indicators

If the f was NOT used

Detected radix

Exponent part without type suffix

Null literal null

Boolean literal true or false

Methods

impl Lit
[src]

String for error reporting. Example: Excpected one of `,` `;` `)`

Trait Implementations

impl Debug for Lit
[src]

Formats the value using the given formatter.

impl Clone for Lit
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Lit
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Lit
[src]