Enum atoms::ParseError [] [src]

pub enum ParseError {
    EndOfFile(usizeusize),
    TrailingGarbage(usizeusize),
    ClosingParen(usizeusize),
    NoExtensions(usizeusize),
    ConsWithoutRight(usizeusize),
    ConsWithoutClose(usizeusize),
    StringLiteral(usizeusize),
    EmptySymbol(usizeusize),
    SymbolEncode(usizeusize),
    BufferError(usizeusizeError),
}

Error that occurs when parsing s-expression.

All forms of this error have the line and column the error occured on stored in the first two members respectively.

Variants

Unexpected end of file or stream

This occurs when no more characters can be read from the input stream.

Trailing characters after end of expression

This error is raised when trying to parseinput as a single expression and more characters are available after a full expression has been parsed. Comments after the expression do not cause this error.

Unexpected closing paren

A closing paren was found as the first character of an expression.

Extensions not in use

An extension expression was used where an extension type has not been provided.

Cons pair without right element

A cons pair was closed before a right side was declared, for example (a . ).

Cons pair not closed after right expression

A cons pair was not closed after the right side was declared, for example (a . b c).

An error occured when trying to parse a string literal.

This is caused when the parser is unable to properly unescape a string literal.

A symbol without any length was used.

This probably caused by a quote not being attached to an expression, for example ( ` , or ' )

Symbol could not be encoded

This error is produced when a the type the represents symbols is unable to encode the given symbol.

Error occured when trying to buffer text from input.

Methods

impl ParseError
[src]

Get the location that an error occured on

Gets the location in the form of (line, column).

Get the line of input that the error occured on.

Get the column on the line of input that the error occured on.

Trait Implementations

impl Error for ParseError
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more

impl Display for ParseError
[src]

Formats the value using the given formatter. Read more

impl Debug for ParseError
[src]

Formats the value using the given formatter.