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

izumi.idealingua.translator.toprotobuf.extensions.ProtobufTranslatorExtension.scala Maven / Gradle / Ivy

There is a newer version: 1.3.20
Show newest version
package izumi.idealingua.translator.toprotobuf.extensions

import izumi.idealingua.model.il.ast.typed.Service
import izumi.idealingua.model.il.ast.typed.TypeDef.{Adt, Alias, DTO, Enumeration, Identifier, Interface}
import izumi.idealingua.translator.TranslatorExtension
import izumi.idealingua.translator.toprotobuf.PBTContext
import izumi.idealingua.translator.toprotobuf.products.CogenProducts

trait ProtobufTranslatorExtension extends TranslatorExtension {
  import izumi.fundamentals.platform.language.Quirks._

  def handleInterface(ctx: PBTContext, interface: Interface, product: CogenProducts.Message): CogenProducts.Message = {
    discard(ctx, interface, manifest)
    product
  }

  def handleDto(ctx: PBTContext, dto: DTO, product: CogenProducts.Message): CogenProducts.Message = {
    discard(ctx, dto, manifest)
    product
  }

  def handleAlias(ctx: PBTContext, alias: Alias, product: CogenProducts.Message): CogenProducts.Message = {
    discard(ctx, alias, manifest)
    product
  }

  def handleIdentifier(ctx: PBTContext, id: Identifier, product: CogenProducts.Message): CogenProducts.Message = {
    discard(ctx, id, manifest)
    product
  }

  def handleEnum(ctx: PBTContext, enumeration: Enumeration, product: CogenProducts.Enum): CogenProducts.Enum = {
    discard(ctx, enumeration, manifest)
    product
  }

  def handleAdt(ctx: PBTContext, adt: Adt, product: CogenProducts.ADT): CogenProducts.ADT = {
    discard(ctx, adt, manifest)
    product
  }

  def handleService(ctx: PBTContext, service: Service, product: CogenProducts.Service): CogenProducts.Service = {
    discard(ctx, service, manifest)
    product
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy