Struct wast::parser::Lookahead1 [−][src]
pub struct Lookahead1<'a> { /* fields omitted */ }
A helpful structure to perform a lookahead of one token to determine what to parse.
For more information see the Parser::lookahead1
method.
Implementations
impl Lookahead1<'_>
[src]
impl Lookahead1<'_>
[src]pub fn peek<T: Peek>(&mut self) -> bool
[src][−]
Attempts to see if T
is the next token in the Parser
this
Lookahead1
references.
For more information see Parser::lookahead1
and Parser::peek
pub fn error(self) -> Error
[src][−]
Generates an error message saying that one of the tokens passed to
Lookahead1::peek
method was expected.
Before calling this method you should call Lookahead1::peek
for all
possible tokens you’d like to parse.