[][src]Struct spdl::SPDLParser

pub struct SPDLParser {
    pub root: SyntacticalInstance,
    pub vars: &'static [SyntacticalInstance],
}

This represents a SPDL parser.

Fields

root: SyntacticalInstance

The root syntactical instance is a tree of syntactical instances that are parsed in order, to accomplish exhaustive parsing of the file.

vars: &'static [SyntacticalInstance]

This is an array of all variables declared in the parser. This is used for syntactical instances with the type "Search" as a place to search for things in.

Implementations

impl SPDLParser[src]

pub fn get_syntax_tree(
    &self,
    input: &'static str,
    trace: bool
) -> Result<SyntaxTree, Vec<SPDLError>>
[src]

This is a function that gets a syntax tree for input code based on the description of this parser. The trace parameter determines whether or not every step of parsing should be traced and printed out.

Trait Implementations

impl Clone for SPDLParser[src]

impl Copy for SPDLParser[src]

impl Debug for SPDLParser[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.