Add accessor for Lex::value
This commit is contained in:
parent
cabe40bd7a
commit
8475720a71
2 changed files with 2 additions and 1 deletions
|
@ -24,4 +24,5 @@ impl Lex {
|
|||
}
|
||||
|
||||
pub fn token(&self) -> Token { self.token }
|
||||
pub fn value(&self) -> &str { self.value.as_str() }
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ mod node_parser;
|
|||
|
||||
use std::iter::Peekable;
|
||||
use sibillexer::Result as LexerResult;
|
||||
use sibillexer::Token;
|
||||
use sibiltypes::Object;
|
||||
use node_parser::{NodeParser, IdParser, ListParser};
|
||||
|
||||
/// The output of calling `parse()` on a Parser is one of these Result objects.
|
||||
pub type Result = std::result::Result<Object, ParseError>;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue