(tokens: &mut Peekable<I>)
| 69 | |
| 70 | impl<'a> Element<'a> { |
| 71 | fn parse_next<I: Iterator<Item = &'a str>>(tokens: &mut Peekable<I>) -> Option<Self> { |
| 72 | tokens |
| 73 | .next() |
| 74 | .and_then(|next| match Self::parse_operator(next) { |
| 75 | Some(operator) => Some(operator), |
| 76 | None => Self::parse_cmd(next, tokens).map(Self::Cmd), |
| 77 | }) |
| 78 | } |
| 79 | |
| 80 | fn parse_operator(token: &str) -> Option<Self> { |
| 81 | match token { |
nothing calls this directly
no outgoing calls
no test coverage detected