Enum ess::sexp::Sexp [] [src]

pub enum Sexp<'a, Loc = ByteSpan> where
    Loc: Span
{ Sym(Cow<'a, str>, Loc), Str(Cow<'a, str>, Loc), Char(char, Loc), Int(i64, Loc), Float(f64, Loc), List(Vec<Sexp<'a, Loc>>, Loc), }

A type representing arbitrary s-expressions.

Sexp carries the source code location it came from along with it for later diagnostic purposes.

Variants

A value representing a symbol.

A value representing a string literal.

A value representing a single character.

A value representing an integer. Any number containing no decimal point will be parsed as an Int.

A value representing a floating point number. Any number containing a decimal point will be parsed as a Float.

A list of subexpressions.

Methods

impl<'a, Loc> Sexp<'a, Loc> where
    Loc: Span
[src]

Gives a reference to the source location contained in the Sexp.

Gives a mutable reference to the Sexp's source location.

impl<'a, Loc> Sexp<'a, Loc> where
    Loc: Span + Clone
[src]

Take ownership of an s-expression's contents.

Trait Implementations

impl<'a, Loc: Debug> Debug for Sexp<'a, Loc> where
    Loc: Span
[src]

Formats the value using the given formatter.

impl<'a, Loc: PartialEq> PartialEq for Sexp<'a, Loc> where
    Loc: Span
[src]

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

This method tests for !=.

impl<'a, Loc: Clone> Clone for Sexp<'a, Loc> where
    Loc: Span
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, Loc: PartialOrd> PartialOrd for Sexp<'a, Loc> where
    Loc: Span
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more