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

Method parse

examples/block3.rs:118–128  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

116 }
117
118 fn parse(mut self) -> Option<Chain> {
119 let mut elements = vec![];
120 while let Some(e) = self.parse_next() {
121 elements.push(e);
122 }
123 if !elements.is_empty() {
124 Some(Chain { elements })
125 } else {
126 None
127 }
128 }
129
130 fn parse_next(&mut self) -> Option<Element> {
131 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