improve abstraction for AssocList, fix bug in optional else (#315)

* improve abstraction for AssocList, fix bug in optional else

* add flag for tracing output, clean up code for output

* turned off tracing by default, updated goldens, removed two examples that use pointers, shouldn't have been there yet
This commit is contained in:
Jeremy G. Siek
2021-03-01 10:00:02 -05:00
committed by GitHub
parent 102ea3ccaf
commit bf6bb800c4
55 changed files with 293 additions and 7431 deletions
+2 -2
View File
@@ -20,14 +20,14 @@ namespace Carbon {
void PrintAct(Action* act, std::ostream& out) {
switch (act->tag) {
case ActionKind::DeleteTmpAction:
std::cout << "delete_tmp(" << act->u.delete_tmp << ")";
out << "delete_tmp(" << act->u.delete_tmp << ")";
break;
case ActionKind::ExpToLValAction:
out << "exp=>lval";
break;
case ActionKind::LValAction:
case ActionKind::ExpressionAction:
PrintExp(act->u.exp);
out << *act->u.exp;
break;
case ActionKind::StatementAction:
PrintStatement(act->u.stmt, 1);