Module pear::macros

source ·
Expand description

Macros§

  • Implements the Show trait for $($T)+ using the existing trait $trait.
  • Runs the parser with the given name and input, then [parsers::eof()].
  • Returns the context from the current mark to the input position inclusive.
  • Return the mark at the current parsing position.
  • Returns an Err(ParseError::new($e)). Can used like format! as well.
  • Returns the last marker that was set.
  • Sets the marker to the current position.
  • Runs a parser returning Some if it succeeds or None otherwise.
  • Invoked much like match, except each condition must be a parser, which is executed, and the corresponding arm is executed only if the parser succeeds. Once a condition succeeds, no other condition is executed.

Attribute Macros§

  • The core attribute macro. Can only be applied to free functions with at least one parameter and a return value. To typecheck, the free function must meet the following typing requirements: