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

Method parse_operator

examples/block3.rs:194–200  ·  view source on GitHub ↗
(token: &str)

Source from the content-addressed store, hash-verified

192
193impl Element {
194 fn parse_operator(token: &str) -> Option<Self> {
195 match token {
196 "&&" => Some(Self::And),
197 "||" => Some(Self::Or),
198 _ => None,
199 }
200 }
201
202 fn is_operator(token: &str) -> bool {
203 Self::parse_operator(token).is_some()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected