[parser] Hand off lex to current parser and collect the result

This commit is contained in:
Eryn Wells 2018-08-24 08:05:39 -07:00
parent d13396bb5d
commit dbd6329dd6
5 changed files with 15 additions and 7 deletions

View file

@ -10,7 +10,7 @@ use node_parser::{NodeParser, NodeParseResult};
pub struct SymParser;
impl NodeParser for SymParser {
fn parse(&mut self, lex: Lex) -> NodeParseResult {
fn parse(&mut self, lex: &Lex) -> NodeParseResult {
match lex.token() {
Token::Id => {
let value = String::from(lex.value());