Enum snoot::Sexpr [] [src]

pub enum Sexpr {
    List {
        list_type: ListType,
        opening_token: TokenInfo,
        closing_token: TokenInfo,
        children: Vec<Sexpr>,
        span: Span,
    },
    UnaryOperator {
        op: TokenInfo,
        child: Box<Sexpr>,
        span: Span,
    },
    Terminal(TokenInfoSpan),
    String(TokenInfoSpan),
}

The S-Expression tree type.

Variants

An S-Expression List.

Typically looks like (...), [...], or {...}.

Fields of List

An s-expression unary operator (currently impossible to construct)

Fields of UnaryOperator

A "terminal" node in the tree.

Examples: 5.0, foo, asdlkh23y823ysd.

A "string" node in the tree.

Examples: "foo"

Methods

impl Sexpr
[src]

Returns the text that built this s-expression

This is a shortcut for .span().text().

Returns an easily-matchable SexprKind value.

Returns the span over the source code that this s-expression encompasses

Returns the last token that contributed to building this expression

Returns the first token that contrtbuted to building this expression

Trait Implementations

impl Eq for Sexpr
[src]

impl PartialEq for Sexpr
[src]

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

This method tests for !=.

impl Debug for Sexpr
[src]

Formats the value using the given formatter.

impl Clone for Sexpr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more