Fix some panics when printing certain AST nodes

This commit is contained in:
Sam Vervaeck 2024-07-11 20:20:25 +02:00
parent 4079241e26
commit 2b7ae3eba3
Signed by: samvv
SSH key fingerprint: SHA256:dIg0ywU1OP+ZYifrYxy8c5esO72cIKB+4/9wkZj1VaY

View file

@ -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: