Trait ParserNodeType

Source
pub trait ParserNodeType<'input>: TidAble<'input> + Sized {
    type TF: TokenFactory<'input> + 'input;
    type Type: ?Sized + ParserRuleContext<'input, Ctx = Self, TF = Self::TF> + 'input;
}
Expand description

Workaround trait for rustc current limitations.

Basically you can consider it as if context trait for generated parser has been implemented as

trait GenratedParserContext:ParserRuleContext<Ctx=dyn GeneratedParserContext>{ ... }

which is not possible, hence this a bit ugly workaround.

Implemented by generated parser for the type that is going to carry information about parse tree node.

Required Associated Types§

Source

type TF: TokenFactory<'input> + 'input

Shortcut for Type::TF

Source

type Type: ?Sized + ParserRuleContext<'input, Ctx = Self, TF = Self::TF> + 'input

Actual type of the parse tree node

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§