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

Method parse

examples/block5.rs:155–165  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

153 }
154
155 fn parse(mut self) -> Option<Chain> {
156 let mut elements = vec![];
157 while let Some(e) = self.parse_next() {
158 elements.push(e);
159 }
160 if !elements.is_empty() {
161 Some(Chain { elements })
162 } else {
163 None
164 }
165 }
166
167 fn parse_next(&mut self) -> Option<Element> {
168 let next = self.tokens.get(self.current).map(|s| s.to_string());

Callers 2

runMethod · 0.45
chains_from_lineFunction · 0.45

Calls 1

parse_nextMethod · 0.45

Tested by

no test coverage detected