Skip to content

Commit 8382a41

Browse files
committed
refactor: remove unused vars #22
1 parent 29a195f commit 8382a41

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

chapi-domain/src/main/kotlin/chapi/domain/expr/Expression.kt

+8-7
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@ package chapi.domain.expr
1111
// }
1212
sealed class Expression {
1313
class BinOp(val lhs: ExpressionNode, val op: BinOpKind, val rhs: ExpressionNode) : ExpressionNode {
14-
override fun toString(): String {
15-
return "$lhs $op $rhs"
16-
}
14+
override fun toString() = "$lhs $op $rhs"
15+
}
16+
17+
class UnaryOp(val lhs: ExpressionNode, val op: UnaryOpKind) : ExpressionNode {
18+
override fun toString(): String = "$op$lhs"
1719
}
1820

19-
class UnaryOp(lhs: ExpressionNode, op: UnaryOpKind) : ExpressionNode
20-
class IntValue(val value: kotlin.Int) : ExpressionNode {
21+
class IntValue(val value: Int) : ExpressionNode {
2122
override fun toString() = value.toString()
2223
}
2324

24-
class Variable(val name: kotlin.String) : ExpressionNode {
25+
class Variable(val name: String) : ExpressionNode {
2526
override fun toString() = name
2627
}
2728

28-
class Identifier(val name: kotlin.String) : ExpressionNode {
29+
class Identifier(val name: String) : ExpressionNode {
2930
override fun toString() = name
3031
}
3132

0 commit comments

Comments
 (0)