Enum dsdl_parser::Const [] [src]

pub enum Const {
    Dec(String),
    Hex(String),
    Oct(String),
    Bin(String),
    Bool(bool),
    Char(String),
    Float(String),
}

A constant must be a primitive scalar type (i.e., arrays and nested data structures are not allowed as constant types).

Variants

Integer zero (0) or Integer literal in base 10, starting with a non-zero character. E.g., 123, -12.

Integer literal in base 16 prefixed with 0x. E.g., 0x123, -0x12, +0x123.

Integer literal in base 8 prefixed with 0o. E.g., 0o123, -0o777, +0o777.

Integer literal in base 2 prefixed with 0b. E.g., 0b1101, -0b101101, +0b101101.

Boolean true or false.

Single ASCII character, ASCII escape sequence, or ASCII hex literal in single quotes. E.g., 'a', '\x61', '\n'.

Floating point literal. Fractional part with an optional exponent part, e.g., 15.75, 1.575E1, 1575e-2, -2.5e-3, +25E-4. Not-a-number (NaN), positive infinity, and negative infinity are intentionally not supported in order to maximize cross-platform compatibility.

Trait Implementations

impl Display for Const
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Const
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Const
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for Const
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Const
[src]