pub struct DebuggerContext { /* private fields */ }
Expand description

Debugger for pest grammars.

Implementations

Loads a grammar from a file.

Loads a grammar from a string.

Loads a parsing input from a file.

Loads a parsing input from a string.

Adds all grammar rules as breakpoints. This is useful for stepping through the entire parsing process. It returns an error if the grammar hasn’t been loaded yet.

Adds a rule to breakpoints.

Removes a rule from breakpoints.

Removes all breakpoints.

Returns a list of all breakpoints.

Starts a debugger session: runs a rule on an input and stops at breakpoints. When the debugger is stopped, an event is sent to the channel using sender. The debugger can be resumed by calling cont. This naturally returns errors if the grammar or input haven’t been loaded yet etc.

Continue the debugger session from the breakpoint. It returns an error if the session finished or wasn’t started yet.

Returns a Position from the loaded input.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.