Fix some panics when printing certain AST nodes
This commit is contained in:
parent
4079241e26
commit
2b7ae3eba3
1 changed files with 6 additions and 0 deletions
|
@ -97,6 +97,8 @@ static std::string describe(NodeKind Type) {
|
||||||
return "'('";
|
return "'('";
|
||||||
case NodeKind::RParen:
|
case NodeKind::RParen:
|
||||||
return "')'";
|
return "')'";
|
||||||
|
case NodeKind::FnKeyword:
|
||||||
|
return "'fn'";
|
||||||
case NodeKind::LBrace:
|
case NodeKind::LBrace:
|
||||||
return "'['";
|
return "'['";
|
||||||
case NodeKind::RBrace:
|
case NodeKind::RBrace:
|
||||||
|
@ -125,6 +127,8 @@ static std::string describe(NodeKind Type) {
|
||||||
return "'->'";
|
return "'->'";
|
||||||
case NodeKind::RArrowAlt:
|
case NodeKind::RArrowAlt:
|
||||||
return "'=>'";
|
return "'=>'";
|
||||||
|
case NodeKind::DoKeyword:
|
||||||
|
return "do";
|
||||||
case NodeKind::PubKeyword:
|
case NodeKind::PubKeyword:
|
||||||
return "'pub'";
|
return "'pub'";
|
||||||
case NodeKind::LetKeyword:
|
case NodeKind::LetKeyword:
|
||||||
|
@ -153,6 +157,8 @@ static std::string describe(NodeKind Type) {
|
||||||
return "'class'";
|
return "'class'";
|
||||||
case NodeKind::InstanceKeyword:
|
case NodeKind::InstanceKeyword:
|
||||||
return "'instance'";
|
return "'instance'";
|
||||||
|
case NodeKind::Backslash:
|
||||||
|
return "'\\'";
|
||||||
case NodeKind::PrefixFunctionDeclaration:
|
case NodeKind::PrefixFunctionDeclaration:
|
||||||
case NodeKind::InfixFunctionDeclaration:
|
case NodeKind::InfixFunctionDeclaration:
|
||||||
case NodeKind::SuffixFunctionDeclaration:
|
case NodeKind::SuffixFunctionDeclaration:
|
||||||
|
|
Loading…
Reference in a new issue