mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 17:20:15 +01:00
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.
24 lines
580 B
C++
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_
|