add an impl of Expr::show for ExprInheritFrom that doesn't crash

ExprVar::show() assumes it has a name. dynamic inherits do not
necessarily (ever?) have a name.

Change-Id: If10893188e307431da17f0c1bd0787adc74f7141
This commit is contained in:
Qyriad
2024-07-04 15:55:38 -06:00
parent 4f0c27abe1
commit 59bf6825ef
4 changed files with 44 additions and 1 deletions
+7
View File
@@ -50,6 +50,13 @@ void ExprVar::show(const SymbolTable & symbols, std::ostream & str) const
str << symbols[name];
}
void ExprInheritFrom::show(SymbolTable const & symbols, std::ostream & str) const
{
str << "(/* expanded inherit (expr) */ ";
fromExpr->show(symbols, str);
str << ")";
}
void ExprSelect::show(const SymbolTable & symbols, std::ostream & str) const
{
str << "(";