Fix variants getting mixed up with bools

This commit is contained in:
Richard Feldman 2019-06-05 01:51:04 -04:00
parent c2cec85202
commit 826b0d5ab0
5 changed files with 111 additions and 33 deletions

View file

@ -11,7 +11,6 @@ pub enum Expr {
Str(String),
InterpolatedStr(Vec<(String, Ident)>, String),
Char(char),
Bool(bool),
Var(Ident),
Let(Pattern, Box<Expr>, Box<Expr>),
@ -62,8 +61,6 @@ impl fmt::Display for Expr {
write!(f, "\"{}\"", escaped_str)
},
Char(ch) => write!(f, "'{}'", *ch),
Bool(true) => write!(f, "True"),
Bool(false) => write!(f, "False"),
Closure(args, _) => write!(f, "<{}-argument function>", args.len()),
ApplyVariant(name, opt_exprs) => {
match opt_exprs {