Files
sybil/src/syn/util.rs
Alek Ratzloff 946a927b09 Initial commit WIP
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-12-21 11:29:59 -08:00

12 lines
256 B
Rust

pub fn got_char_or_eof(got: Option<char>) -> String {
if let Some(got) = got {
expected_got_char(got)
} else {
"EOF".to_string()
}
}
pub fn expected_got_char(c: char) -> String {
format!("character {}", c.escape_debug())
}