Crate pest_typed

source ·
Expand description

Types for statically typed nodes and parser.

Based on pest grammar. See https://pest.rs for more information.

Features:

  • std: include std support.

    Without this feature, we’ll use core and alloc.

It’s suggested that you use pest_typed_derive to automatically generate types from your grammar.

And though we have a lot of macros in this crate, only some of them are designed for usage outside the crate. They’re listed below:

Modules§

  • Definition of choices-related macros and types.
  • Types for different kinds of parsing failures.
  • Simulates pest::iterators.
  • Predefined tree nodes generics. The generator may use this for convenience. Normally you don’t need to reference this module by yourself.
  • Re-export items from std (if feature std enabled), or core and alloc (if disabled).
  • Macros and functions for defining structs, most of which are RuleStruct.
  • Definition of sequence-related macros and types.
  • Tracker for parsing failures.

Macros§

Structs§

  • A pointer type that uniquely owns a heap allocation of type T.
  • A cursor position in a &str which provides useful methods to manually parse that string.
  • A span over a &str. It is created from either two Positions or from a Pair.
  • Implementation of a Stack which maintains popped elements and length of previous states in order to rewind the stack to a previous state.

Traits§

Functions§