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

Method parse

examples/block2.rs:41–51  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

39 }
40
41 fn parse(mut self) -> Option<Chain> {
42 let mut elements = vec![];
43 while let Some(e) = self.parse_next() {
44 elements.push(e);
45 }
46 if !elements.is_empty() {
47 Some(Chain { elements })
48 } else {
49 None
50 }
51 }
52
53 fn parse_next(&mut self) -> Option<Element> {
54 let next = self.tokens.get(self.current).map(|s| s.to_string());

Callers 1

chains_from_lineFunction · 0.45

Calls 1

parse_nextMethod · 0.45

Tested by

no test coverage detected