[parser, types] Add Obj::take() and use it to take the Obj from the parser when it is done
This commit is contained in:
parent
929846152e
commit
8e9fde7a9f
2 changed files with 8 additions and 1 deletions
|
@ -30,8 +30,10 @@ impl NodeParser for ListParser {
|
|||
Token::Id => {
|
||||
let parser = SymParser{};
|
||||
NodeParseResult::Push { next: Box::new(parser) }
|
||||
},
|
||||
Token::RightParen => {
|
||||
NodeParseResult::Complete { obj: self.list.take() }
|
||||
}
|
||||
_ => NodeParseResult::Error { msg: "womp".to_string() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue