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

izumi.idealingua.translator.toprotobuf.InterfaceRenderer.scala Maven / Gradle / Ivy

The newest version!
package izumi.idealingua.translator.toprotobuf

import izumi.idealingua.model.il.ast.typed.TypeDef.Interface
import izumi.idealingua.translator.toprotobuf.products.CogenProducts

final class InterfaceRenderer(ctx: PBTContext) {
  def defns(i: Interface): CogenProducts.Message = {
    val self   = ctx.conv.toProtobuf(i.id)
    val fields = ctx.conv.toProtobuf(i.struct.fields)
    ctx.ext.extend(i, CogenProducts.Message(self, fields), _.handleInterface)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy