Add accessor for Lex::value

This commit is contained in:
Eryn Wells 2018-08-20 15:21:20 -07:00
parent cabe40bd7a
commit 8475720a71
2 changed files with 2 additions and 1 deletions

View file

@ -24,4 +24,5 @@ impl Lex {
}
pub fn token(&self) -> Token { self.token }
pub fn value(&self) -> &str { self.value.as_str() }
}

View file

@ -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)]