mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 15:18:11 +00:00
1 parent
47325be112
commit
367f9e4e94
24 files changed
+82
-84
No files matched your search
@@ -16,11 +16,11 @@ void Declaration::Print(llvm::raw_ostream& out) const {
|
||||
out << cast<FunctionDeclaration>(*this).Definition();
|
||||
break;
|
||||
|
||||
case Kind::StructDeclaration: {
|
||||
const StructDefinition& struct_def =
|
||||
cast<StructDeclaration>(*this).Definition();
|
||||
out << "struct " << struct_def.name << " {\n";
|
||||
for (Member* m : struct_def.members) {
|
||||
case Kind::ClassDeclaration: {
|
||||
const ClassDefinition& class_def =
|
||||
cast<ClassDeclaration>(*this).Definition();
|
||||
out << "class " << class_def.name << " {\n";
|
||||
for (Member* m : class_def.members) {
|
||||
out << *m;
|
||||
}
|
||||
out << "}\n";
|
||||
|
||||
Reference in new issue
Block a user