[FIR] Remove FirOperatorCall node from fir tree

This commit is contained in:
Ivan Kylchik
2020-07-20 10:48:21 +03:00
parent 3c01a39846
commit 8b9fb6a6cd
22 changed files with 2 additions and 252 deletions
@@ -378,14 +378,7 @@ class ExpressionsConverter(
explicitReceiver = getAsFirExpression(argument, "No operand")
}
}
else -> {
val firOperation = operationToken.toFirOperation()
buildOperatorCall {
source = unaryExpression.toFirSourceElement()
operation = firOperation
argumentList = buildUnaryArgumentList(getAsFirExpression<FirExpression>(argument, "No operand"))
}
}
else -> throw IllegalStateException("Unexpected expression: ${unaryExpression.asText}")
}
}
@@ -35,7 +35,6 @@ data class WhenEntry(
fun toFirWhenConditionWithoutSubject(): FirExpression {
return when (val condition = conditions.firstOrNull()) {
// is FirOperatorCall -> condition.arguments.first()
null -> buildErrorExpression(null, ConeSimpleDiagnostic("No expression in condition with expression", DiagnosticKind.Syntax))
else -> condition
}
@@ -1687,13 +1687,7 @@ class RawFirBuilder(
explicitReceiver = argument.toFirExpression("No operand")
}
}
else -> {
buildOperatorCall {
source = expression.toFirSourceElement()
operation = operationToken.toFirOperation()
argumentList = buildUnaryArgumentList(argument.toFirExpression("No operand"))
}
}
else -> throw IllegalStateException("Unexpected expression: ${expression.text}")
}
}