(&mut self)
| 128 | } |
| 129 | |
| 130 | fn parse_next(&mut self) -> Option<Element> { |
| 131 | let next = self.tokens.get(self.current).map(|s| s.to_string()); |
| 132 | next.and_then(|next| { |
| 133 | self.current += 1; |
| 134 | match Element::parse_operator(&next) { |
| 135 | Some(operator) => Some(operator), |
| 136 | None => self.parse_cmd(next.to_string()).map(Element::Cmd), |
| 137 | } |
| 138 | }) |
| 139 | } |
| 140 | |
| 141 | fn parse_cmd(&mut self, binary: String) -> Option<Cmd> { |
| 142 | let mut args: Vec<String> = vec![]; |