Rename struct to class per #651 (#765)

This commit is contained in:
Jon Meow
2021-08-19 12:15:20 -07:00
committed by GitHub
parent 47325be112
commit 367f9e4e94
24 changed files with 82 additions and 84 deletions
+5 -5
View File
@@ -46,7 +46,7 @@ class Value {
FunctionType,
PointerType,
AutoType,
StructType,
ClassType,
ChoiceType,
ContinuationType, // The type of a continuation.
VariableType, // e.g., generic type parameters.
@@ -361,16 +361,16 @@ class AutoType : public Value {
};
// A struct type.
class StructType : public Value {
class ClassType : public Value {
public:
StructType(std::string name, VarValues fields, VarValues methods)
: Value(Kind::StructType),
ClassType(std::string name, VarValues fields, VarValues methods)
: Value(Kind::ClassType),
name(std::move(name)),
fields(std::move(fields)),
methods(std::move(methods)) {}
static auto classof(const Value* value) -> bool {
return value->Tag() == Kind::StructType;
return value->Tag() == Kind::ClassType;
}
auto Name() const -> const std::string& { return name; }