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

izumi.idealingua.il.renderer.RAdtMember.scala Maven / Gradle / Ivy

The newest version!
package izumi.idealingua.il.renderer

import izumi.functional.Renderable
import izumi.idealingua.model.il.ast.typed.AdtMember

class RAdtMember(context: IDLRenderingContext) extends Renderable[AdtMember] {
  import context._
  override def render(field: AdtMember): String = {
    val t = field.typeId.render()
    val repr = field.memberName match {
      case Some(name) =>
        s"$t as $name"
      case None =>
        t
    }

    context.meta.withMeta(field.meta, repr)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy