refactor: make microWacc.ArrayElem recursive rather than flat
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package wacc
|
||||
|
||||
import cats.data.NonEmptyList
|
||||
|
||||
object microWacc {
|
||||
import wacc.types._
|
||||
|
||||
@@ -19,9 +17,7 @@ object microWacc {
|
||||
extends Expr(identTy)
|
||||
with CallTarget(identTy)
|
||||
with LValue
|
||||
case class ArrayElem(value: LValue, indices: NonEmptyList[Expr])(ty: SemType)
|
||||
extends Expr(ty)
|
||||
with LValue
|
||||
case class ArrayElem(value: LValue, index: Expr)(ty: SemType) extends Expr(ty) with LValue
|
||||
|
||||
// Operators
|
||||
case class UnaryOp(x: Expr, op: UnaryOperator)(ty: SemType) extends Expr(ty)
|
||||
|
||||
Reference in New Issue
Block a user