Struct regex_syntax::hir::translate::TranslatorI[][src]

struct TranslatorI<'t, 'p> {
    trans: &'t Translator,
    pattern: &'p str,
}

The internal implementation of a translator.

This type is responsible for carrying around the original pattern string, which is not tied to the internal state of a translator.

A TranslatorI exists for the time it takes to translate a single Ast.

Fields

Methods

impl<'t, 'p> TranslatorI<'t, 'p>
[src]

Build a new internal translator.

Return a reference to the underlying translator.

Push the given frame on to the call stack.

Pop the top of the call stack. If the call stack is empty, return None.

Create a new error with the given span and error type.

Return a copy of the active flags.

Set the flags of this translator from the flags set in the given AST. Then, return the old flags.

Convert an Ast literal to its scalar representation.

When Unicode mode is enabled, then this always succeeds and returns a char (Unicode scalar value).

When Unicode mode is disabled, then a raw byte is returned. If that byte is not ASCII and invalid UTF-8 is not allowed, then this returns an error.

Return a scalar byte value suitable for use as a literal in a byte character class.

Trait Implementations

impl<'t, 'p> Visitor for TranslatorI<'t, 'p>
[src]

The result of visiting an AST.

An error that visiting an AST might return.

All implementors of Visitor must provide a finish method, which yields the result of visiting the AST or an error. Read more

This method is called on an Ast before descending into child Ast nodes. Read more

This method is called on an Ast after descending all of its child Ast nodes. Read more

This method is called on every ClassSetItem before descending into child nodes. Read more

This method is called on every ClassSetItem after descending into child nodes. Read more

This method is called on every ClassSetBinaryOp before descending into child nodes. Read more

This method is called between the left hand and right hand child nodes of a ClassSetBinaryOp. Read more

This method is called on every ClassSetBinaryOp after descending into child nodes. Read more

This method is called before beginning traversal of the AST.

This method is called between child nodes of an Alternation. Read more

impl<'t, 'p> Clone for TranslatorI<'t, 'p>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'t, 'p> Debug for TranslatorI<'t, 'p>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'t, 'p> !Send for TranslatorI<'t, 'p>

impl<'t, 'p> !Sync for TranslatorI<'t, 'p>