(&mut self)
| 51 | } |
| 52 | |
| 53 | fn parse_next(&mut self) -> Option<Element> { |
| 54 | let next = self.tokens.get(self.current).map(|s| s.to_string()); |
| 55 | next.and_then(|next| { |
| 56 | self.current += 1; |
| 57 | match Element::parse_operator(&next) { |
| 58 | Some(operator) => Some(operator), |
| 59 | None => self.parse_cmd(next.to_string()).map(Element::Cmd), |
| 60 | } |
| 61 | }) |
| 62 | } |
| 63 | |
| 64 | fn parse_cmd(&mut self, binary: String) -> Option<Cmd> { |
| 65 | let mut args: Vec<String> = vec![]; |