Files
carbon-lang/executable_semantics/ast/struct_definition.h
T
Jon Meow acb33932cb Migrate Declaration to variant (#644)
Note this makes some structural choices that I'm not sure how popular they'll be... Most notably, I could remove `DeclarationKind` because I'm using `std::visit` and `Declaration::Visitor` in reality. I could go to `switch(tag())` instead, but I'm wondering if this approach will be well received for the separation of ownership. Alternatively, I could move `Declaration` around so that it actually implements the things like `TopLevel` -- I did feel weird with the old structure of typecheck.cpp implementing members of declaration.h, though.
2021-07-15 16:22:56 -07:00

24 lines
580 B
C++

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef EXECUTABLE_SEMANTICS_AST_STRUCT_DEFINITION_H_
#define EXECUTABLE_SEMANTICS_AST_STRUCT_DEFINITION_H_
#include <list>
#include <string>
#include "executable_semantics/ast/member.h"
namespace Carbon {
struct StructDefinition {
int line_num;
std::string name;
std::list<Member*> members;
};
} // namespace Carbon
#endif // EXECUTABLE_SEMANTICS_AST_STRUCT_DEFINITION_H_