Skip to main content

Crate token_parser

Crate token_parser 

Source
Expand description

Some utilities for parsing some format based on nested lists into arbitrary data structures. It’s also meant to be used as a backend for parsers.

Macros§

derive_symbol_parsable
Derives Parsable from symbol for types which implement FromStr.
derive_symbol_unparsable
Derives Unparsable from symbol for types which implement Display.

Structs§

Error
The error type for token parsing, containing a kind and an optional source position.
Parser
The token parser to parse the units into wanted types.
Span
A source range with line, column, and byte offsets.

Enums§

ErrorKind
The kind of error that occurred during token parsing.
Unit
Some unit, which represents an intermediate state.

Traits§

Context
A trait required for all contexts being used for token parsing.
Parsable
This trait needs to be implemented for every struct which can be parsed using the token parser.
Unparsable
The reverse of Parsable: emits a token Unit from a value.

Type Aliases§

Result
The result type for token parsing.