From 2b7ae3eba332ce6bbac628cd546fef98f541eead Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Thu, 11 Jul 2024 20:20:25 +0200 Subject: [PATCH] Fix some panics when printing certain AST nodes --- src/ConsolePrinter.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ConsolePrinter.cc b/src/ConsolePrinter.cc index c8305e61a..c59a56d3d 100644 --- a/src/ConsolePrinter.cc +++ b/src/ConsolePrinter.cc @@ -97,6 +97,8 @@ static std::string describe(NodeKind Type) { return "'('"; case NodeKind::RParen: return "')'"; + case NodeKind::FnKeyword: + return "'fn'"; case NodeKind::LBrace: return "'['"; case NodeKind::RBrace: @@ -125,6 +127,8 @@ static std::string describe(NodeKind Type) { return "'->'"; case NodeKind::RArrowAlt: return "'=>'"; + case NodeKind::DoKeyword: + return "do"; case NodeKind::PubKeyword: return "'pub'"; case NodeKind::LetKeyword: @@ -153,6 +157,8 @@ static std::string describe(NodeKind Type) { return "'class'"; case NodeKind::InstanceKeyword: return "'instance'"; + case NodeKind::Backslash: + return "'\\'"; case NodeKind::PrefixFunctionDeclaration: case NodeKind::InfixFunctionDeclaration: case NodeKind::SuffixFunctionDeclaration: