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

bsp.codegen.bsp4s.Main.scala Maven / Gradle / Ivy

The newest version!
package bsp.codegen.bsp4s

import bsp.codegen.{
  CodegenFile,
  ExtensionLoader,
  FilesGenerator,
  ModelLoader,
  ProtocolVersionLoader
}
import bsp.codegen.ir.SmithyToIR

object Codegen {
  def run(): List[CodegenFile] = {
    val model = ModelLoader.loadModel()
    val ir = new SmithyToIR(model)
    val namespaces = ExtensionLoader.namespaces()

    val definitions = namespaces.flatMap(ir.definitions).sortBy(_.shapeId.getName)
    val version = ProtocolVersionLoader.version()

    val scalaRenderer = new ScalaRenderer("ch.epfl.scala.bsp", definitions, version)

    scalaRenderer.render()
  }
}

object Main extends FilesGenerator(Codegen.run())




© 2015 - 2024 Weber Informatics LLC | Privacy Policy