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

Method parse_operator

examples/final.rs:80–86  ·  view source on GitHub ↗
(token: &str)

Source from the content-addressed store, hash-verified

78 }
79
80 fn parse_operator(token: &str) -> Option<Self> {
81 match token {
82 "&&" => Some(Self::And),
83 "||" => Some(Self::Or),
84 _ => None,
85 }
86 }
87
88 fn is_operator(token: &str) -> bool {
89 Self::parse_operator(token).is_some()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected