Fix segmentation fault
This segfault occurs in the future commits, but because it's more important, I'm commiting it first.
This commit is contained in:
parent
fa2dcddd47
commit
9539389e4f
|
@ -315,7 +315,7 @@ enum Token {
|
|||
impl std::fmt::Display for Token {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
return match self {
|
||||
token @ Token::IntegerLiteral(_) => write!(f, "{}", token),
|
||||
Token::IntegerLiteral(s) => write!(f, "{}", s),
|
||||
token => write!(f, "{}", match token {
|
||||
Token::Plus => "+",
|
||||
Token::Semicolon => ";",
|
||||
|
|
Loading…
Reference in a new issue