All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.scalanative.nir.Next.scala Maven / Gradle / Ivy

There is a newer version: 0.5.6
Show newest version
package scala.scalanative
package nir

sealed abstract class Next {
  def name: Local

  final def show: String = nir.Show(this)
}
object Next {
  case object None extends Next {
    def name: Local =
      throw new UnsupportedOperationException
  }
  final case class Unwind(exc: Val.Local, next: Next) extends Next {
    def name: Local = next.name
  }
  final case class Case(value: Val, next: Next) extends Next {
    def name: Local = next.name
  }
  final case class Label(name: Local, args: Seq[Val]) extends Next

  def apply(name: Local): Label =
    Label(name, Seq.empty)
  def Case(value: Val, name: Local): Case =
    Case(value, Next(name))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy