[−][src]Trait turtle_syntax::Parsable
Elements that can be parsed using a lexer.
Document
might be the most useful parsable element that implement this trait.
Required methods
fn parse<E: Error, L: Iterator<Item = Result<Loc<Token>, E>>>(
lexer: &mut Peekable<L>,
pos: Position
) -> Result<Loc<Self>, E>
lexer: &mut Peekable<L>,
pos: Position
) -> Result<Loc<Self>, E>
Parse the element, pulling the tokens from the given lexer.
Since the grammar of Turtle is LL1, the lexer must be Peekable
to be able to look the next token ahead.
Implementors
impl Parsable for Statement
[src]
fn parse<E: Error, L: Iterator<Item = Result<Loc<Token>, E>>>(
lexer: &mut Peekable<L>,
pos: Position
) -> Result<Loc<Self>, E>
[src]
lexer: &mut Peekable<L>,
pos: Position
) -> Result<Loc<Self>, E>