Enum sparser::Value [] [src]

pub enum Value {
    List(Cons),
    Symbol(String),
    Number(usize),
    Bool(bool),
    Literal(String),
    Null,
}

Value represents all the things that are elements of the list expression

Variants

A linked list

Symbol, eg. (if this than that), the word "if" is a symbol as well as "this", "than" and "that"

A number

A boolean (true or false)

A literal which is not futher parsed

The end of a linked list

Methods

impl Value
[src]

Gives the head of the list if value is a list

Gives the tail of the list if value is a list

Gives true if the current value is a symbol false if not

Gives true if the current value is a number false if not

If the current value is a boolean, gives the value of that boolean otherwise false is returned

Oposite of is_true()

Gives the symbol stored in the Value container

Gives the number stored in the Value container

Gives the literal contained in Value

Trait Implementations

impl Debug for Value
[src]

Formats the value using the given formatter.