Files
sybil/src/syn/util.rs

12 lines
256 B
Rust
Raw Normal View History

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())
}