(&mut self)
| 165 | } |
| 166 | |
| 167 | fn parse_next(&mut self) -> Option<Element> { |
| 168 | let next = self.tokens.get(self.current).map(|s| s.to_string()); |
| 169 | next.and_then(|next| { |
| 170 | self.current += 1; |
| 171 | match Element::parse_operator(&next) { |
| 172 | Some(operator) => Some(operator), |
| 173 | None => self.parse_cmd(next.to_string()).map(Element::Cmd), |
| 174 | } |
| 175 | }) |
| 176 | } |
| 177 | |
| 178 | fn parse_cmd(&mut self, binary: String) -> Option<Cmd> { |
| 179 | let mut args: Vec<String> = vec![]; |