MCPcopy Create free account
hub / github.com/corrode/write-yourself-a-shell / parse_next

Method parse_next

examples/block3.rs:130–139  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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![];

Callers 1

parseMethod · 0.45

Calls 1

parse_cmdMethod · 0.45

Tested by

no test coverage detected