Initial commit WIP

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2021-12-21 11:29:59 -08:00
commit 946a927b09
12 changed files with 960 additions and 0 deletions

11
src/syn/util.rs Normal file
View File

@@ -0,0 +1,11 @@
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())
}