feat: handle punning in a non-ambiguous way

This commit is contained in:
rvcas
2022-12-04 18:49:21 -05:00
committed by Lucas
parent 391849bf37
commit 9ebc836b89
5 changed files with 56 additions and 71 deletions

View File

@@ -69,7 +69,6 @@ pub fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = ParseError> {
"fn" => Token::Fn,
"if" => Token::If,
"else" => Token::Else,
"then" => Token::Then,
"is" => Token::Is,
"let" => Token::Let,
"opaque" => Token::Opaque,

View File

@@ -72,7 +72,6 @@ pub enum Token {
Trace,
Type,
When,
Then,
}
impl fmt::Display for Token {
@@ -146,7 +145,6 @@ impl fmt::Display for Token {
Token::Todo => "todo",
Token::Trace => "try",
Token::Type => "type",
Token::Then => "then",
};
write!(f, "\"{}\"", s)
}