mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 09:25:00 +01:00
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:
@@ -20,9 +20,8 @@ auto MakeField(int line_num, std::string name, Expression* type) -> Member* {
|
||||
void PrintMember(Member* m) {
|
||||
switch (m->tag) {
|
||||
case MemberKind::FieldMember:
|
||||
std::cout << "var " << *m->u.field.name << " : ";
|
||||
PrintExp(m->u.field.type);
|
||||
std::cout << ";" << std::endl;
|
||||
std::cout << "var " << *m->u.field.name << " : " << *m->u.field.type
|
||||
<< ";" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user