Expand description
Utility types and helpers for lexing and parsing.
Contains common utilities including:
- Generic array deque and type-level numbers (re-exported from
hybrid-arraydeque) - Delimited and escaped sequence helpers
- Display traits for human-readable, SDL, and syntax tree output
- Positioned character iterators
- Message and knowledge types for error reporting
Re-exports§
pub use Owned;pub use Ref;pub use hybrid_arraydeque as arraydeque;pub use typenum;
Modules§
- knowledge
- Common knowledge types for lexing and parsing.
Structs§
- Array
Deque - Re-export of hybrid-arraydeque for direct access.
A fixed-capacity, stack-allocated double-ended queue (deque) backed by
Array. - Compact
Display - A wrapper that implements
Displayfor compact formatting. - CowStr
- Feature-aware message container with a unified API.
- Delimited
- A value delimited by opening and closing markers with source location tracking.
- Escaped
Lexeme - A generic escape sequence representation using a lexeme.
- Human
Display - A wrapper that implements
DisplayusingDisplayHumanformatting. - Ignored
- A marker type representing ignored values.
- Multi
Char Escape - A multi-character escape sequence representation.
- OneOf
- Feature-aware slice with a unified API.
- Positioned
Char - A character paired with its byte position in the source input.
- Pretty
Display - A wrapper that implements
Displayfor pretty formatting. - Single
Char Escape - A single-character escape sequence representation.
- Syntax
Tree Display - A helper struct for displaying in a SyntaxTree.
- Trimmed
- The trimmed-span form of a span-shaped marker, used as a type marker.
Enums§
- Expected
- An enumeration representing expected tokens or values in parsing contexts.
- Lexeme
- A compact, zero-copy description of a lexeme in source code.
- Maybe
- An enum that can hold either a reference or an owned value.
Traits§
- CharLen
- A trait for character-like types that can report their encoded length in bytes.
- Display
Compact - A trait for formatting values in a compact, space-efficient representation.
- Display
Human - A trait for displaying values in a human-readable format.
- Display
Pretty - A trait for formatting values in a human-friendly, readable representation.
- DisplaySDL
- A trait for displaying values with configurable formatting options.
- Display
Syntax Tree - A trait for displaying in a SyntaxTree style.
- Downcast
- A fallible owned projection to
T. - Downcast
Ref - A fallible borrowed projection to
T. - Equivalent
- A trait for cross-type equivalence checking.
- Into
Components - Enables destructuring a parsed element into its constituent components.
- Into
Equivalent - A trait for converting into an equivalent type.
- IsAscii
Char - A trait for checking if a token is an ASCII character.
- ToEquivalent
- A trait for converting to an equivalent type.
Type Aliases§
- Maybe
Mut - A type alias for a
Maybeenum that holds either a mutable reference or an owned value. - Maybe
Ref - A type alias for a
Maybeenum that holds either a reference or an owned value. - Phantom
Delimited - A phantom delimited value with no meaningful delimiters, span, or data, used as a type marker.
- Phantom
Located - A located value with no meaningful source or span, used as a type marker.
- Phantom
Sliced - A sliced value with no meaningful slice, used as a type marker.
- Phantom
Span - A span with no meaningful offsets, used as a type marker.