Crate resrap[][src]

Expand description

A parsing library heavily leveraged by proc_macro.

In resrap, syntax trees are defined by the structure of data types implmenting Parse.

Given T : Parse, a resrap::Result<T> is returned by passing a Position to T::parse.

Along with the Parse trait, there’s also a derive macro of the same name which automatically implements Parse for a struct or enum, given each of its members or variants also implement it.

Structs

An Error type created by an unsuccessful parse.

Given P : Parse, attempts parsing whitespace before and after parsing P, then returning P.

An Iterator over a string being parsed.

When parsed, matches a &'static str passed generically to Token.

Container for a whitespace char.

Traits

Constructs the implementing type by fully or partially consuming a Position.

Type Definitions

Derive Macros

Types that derive Parse will automatically implement Parse, provided its members or variants do also.