mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:31:06 +01:00
Rename PrimitiveOperatorExpression to OperatorExpression. (#1530)
This isn't modeling only primitive operators any more: it also models operators that are rewritten as calls to an interface function.
This commit is contained in:
@@ -130,9 +130,9 @@ void Expression::Print(llvm::raw_ostream& out) const {
|
||||
PrintFields(out, cast<StructTypeLiteral>(*this).fields(), ": ");
|
||||
out << "}";
|
||||
break;
|
||||
case ExpressionKind::PrimitiveOperatorExpression: {
|
||||
case ExpressionKind::OperatorExpression: {
|
||||
out << "(";
|
||||
const auto& op = cast<PrimitiveOperatorExpression>(*this);
|
||||
const auto& op = cast<OperatorExpression>(*this);
|
||||
switch (op.arguments().size()) {
|
||||
case 0:
|
||||
out << ToString(op.op());
|
||||
@@ -287,7 +287,7 @@ void Expression::PrintID(llvm::raw_ostream& out) const {
|
||||
case ExpressionKind::StructLiteral:
|
||||
case ExpressionKind::StructTypeLiteral:
|
||||
case ExpressionKind::CallExpression:
|
||||
case ExpressionKind::PrimitiveOperatorExpression:
|
||||
case ExpressionKind::OperatorExpression:
|
||||
case ExpressionKind::IntrinsicExpression:
|
||||
case ExpressionKind::UnimplementedExpression:
|
||||
case ExpressionKind::FunctionTypeLiteral:
|
||||
|
||||
Reference in New Issue
Block a user