mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 15:18:11 +00:00
Migrate declaration parsing to value semantics (#614)
* Use Expression by value in FunctionDefinition * Migrate choice declarations to value semantics * Migrate Declaration parsing to value semantics
This commit is contained in:
1 parent
7e70a0335e
commit
fa5b9cd553
9 files changed
+90
-81
No files matched your search
@@ -20,9 +20,9 @@ void StructDeclaration::Print() const {
|
||||
|
||||
void ChoiceDeclaration::Print() const {
|
||||
std::cout << "choice " << name << " {" << std::endl;
|
||||
for (auto& alternative : alternatives) {
|
||||
std::cout << "alt " << alternative.first << " ";
|
||||
PrintExp(alternative.second);
|
||||
for (const auto& [name, signature] : alternatives) {
|
||||
std::cout << "alt " << name << " ";
|
||||
PrintExp(&signature);
|
||||
std::cout << ";" << std::endl;
|
||||
}
|
||||
std::cout << "}" << std::endl;
|
||||
|
||||
Reference in new issue
Block a user