Enum SurfaceSyntaxTree

Source
pub enum SurfaceSyntaxTree<'a> {
Show 25 variants Grammar { lexer: SpanBox<'a, Self>, parser: SpanBox<'a, Self>, }, Parser { entrypoint: WithSpan<'a, ()>, rules: Vec<WithSpan<'a, Self>>, }, Lexer { rules: Vec<WithSpan<'a, Self>>, }, LexicalAlternative { lhs: SpanBox<'a, Self>, rhs: SpanBox<'a, Self>, }, LexicalSequence { lhs: SpanBox<'a, Self>, rhs: SpanBox<'a, Self>, }, LexicalStar { inner: SpanBox<'a, Self>, }, LexicalPlus { inner: SpanBox<'a, Self>, }, LexicalOptional { inner: SpanBox<'a, Self>, }, LexicalNot { inner: SpanBox<'a, Self>, }, ParserAlternative { lhs: SpanBox<'a, Self>, rhs: SpanBox<'a, Self>, }, ParserSequence { lhs: SpanBox<'a, Self>, rhs: SpanBox<'a, Self>, }, ParserStar { inner: SpanBox<'a, Self>, }, ParserPlus { inner: SpanBox<'a, Self>, }, ParserOptional { inner: SpanBox<'a, Self>, }, LexicalDefinition { name: WithSpan<'a, ()>, expr: SpanBox<'a, Self>, }, LexicalToken { active: bool, name: WithSpan<'a, ()>, expr: SpanBox<'a, Self>, }, Range { start: char, end: char, }, String(String), Bottom, Empty, Char { value: WithSpan<'a, char>, }, ParserDefinition { active: bool, name: WithSpan<'a, ()>, expr: SpanBox<'a, Self>, }, ParserFixpoint { active: bool, name: WithSpan<'a, ()>, expr: SpanBox<'a, Self>, }, ParserRuleRef { name: WithSpan<'a, ()>, }, LexicalRuleRef { name: WithSpan<'a, ()>, },
}

Variants§

§

Grammar

Fields

§lexer: SpanBox<'a, Self>
§parser: SpanBox<'a, Self>
§

Parser

Fields

§entrypoint: WithSpan<'a, ()>
§rules: Vec<WithSpan<'a, Self>>
§

Lexer

Fields

§rules: Vec<WithSpan<'a, Self>>
§

LexicalAlternative

Fields

§lhs: SpanBox<'a, Self>
§rhs: SpanBox<'a, Self>
§

LexicalSequence

Fields

§lhs: SpanBox<'a, Self>
§rhs: SpanBox<'a, Self>
§

LexicalStar

Fields

§inner: SpanBox<'a, Self>
§

LexicalPlus

Fields

§inner: SpanBox<'a, Self>
§

LexicalOptional

Fields

§inner: SpanBox<'a, Self>
§

LexicalNot

Fields

§inner: SpanBox<'a, Self>
§

ParserAlternative

Fields

§lhs: SpanBox<'a, Self>
§rhs: SpanBox<'a, Self>
§

ParserSequence

Fields

§lhs: SpanBox<'a, Self>
§rhs: SpanBox<'a, Self>
§

ParserStar

Fields

§inner: SpanBox<'a, Self>
§

ParserPlus

Fields

§inner: SpanBox<'a, Self>
§

ParserOptional

Fields

§inner: SpanBox<'a, Self>
§

LexicalDefinition

Fields

§name: WithSpan<'a, ()>
§expr: SpanBox<'a, Self>
§

LexicalToken

Fields

§active: bool
§name: WithSpan<'a, ()>
§expr: SpanBox<'a, Self>
§

Range

Fields

§start: char
§end: char
§

String(String)

§

Bottom

§

Empty

§

Char

Fields

§value: WithSpan<'a, char>
§

ParserDefinition

Fields

§active: bool
§name: WithSpan<'a, ()>
§expr: SpanBox<'a, Self>
§

ParserFixpoint

Fields

§active: bool
§name: WithSpan<'a, ()>
§expr: SpanBox<'a, Self>
§

ParserRuleRef

Fields

§name: WithSpan<'a, ()>
§

LexicalRuleRef

Fields

§name: WithSpan<'a, ()>

Trait Implementations§

Source§

impl<'a> Debug for SurfaceSyntaxTree<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for SurfaceSyntaxTree<'a>

§

impl<'a> RefUnwindSafe for SurfaceSyntaxTree<'a>

§

impl<'a> Send for SurfaceSyntaxTree<'a>

§

impl<'a> Sync for SurfaceSyntaxTree<'a>

§

impl<'a> Unpin for SurfaceSyntaxTree<'a>

§

impl<'a> UnwindSafe for SurfaceSyntaxTree<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.