Rename some classes to match the design better (#1287)

* `FieldAccessExpression` -> `SimpleMemberAccessExpression`
    * Member `aggregate` -> `object`
    * Member `field` -> `member`
* `CompoundFieldAccessExpression` -> `CompoundMemberAccessExpression`
* `GetField` -> `GetMember`

As discussed in #1233.
This commit is contained in:
Richard Smith
2022-05-24 17:51:54 -07:00
committed by GitHub
parent 8b07d1ce5d
commit 4cf7ed4f12
45 changed files with 632 additions and 626 deletions
+4 -3
View File
@@ -130,12 +130,13 @@ static auto GetMember(Nonnull<Arena*> arena, Nonnull<const Value*> v,
}
}
auto Value::GetField(Nonnull<Arena*> arena, const FieldPath& path,
SourceLocation source_loc) const
auto Value::GetMember(Nonnull<Arena*> arena, const FieldPath& path,
SourceLocation source_loc) const
-> ErrorOr<Nonnull<const Value*>> {
Nonnull<const Value*> value(this);
for (const FieldPath::Component& field : path.components_) {
CARBON_ASSIGN_OR_RETURN(value, GetMember(arena, value, field, source_loc));
CARBON_ASSIGN_OR_RETURN(value,
Carbon::GetMember(arena, value, field, source_loc));
}
return value;
}