Skip to content

Commit

Permalink
dev: move code gen to artifact module
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Sep 20, 2024
1 parent 436928d commit 46be1a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/cosmo/src/main/scala/cosmo/CodeGen.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package cosmo
package cosmo.artifact

import scala.compiletime.ops.boolean
import ir._
import cosmo._
import cosmo.ir._

class CodeGen(implicit val env: Env) {
val fns = env.fid.map(f => s"${f.ns.mkString("::")}")
Expand Down
2 changes: 1 addition & 1 deletion packages/cosmo/src/main/scala/cosmo/Cosmo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Cosmo extends Transpiler {

def cppBackend(e: Env): Option[(String, Env)] = {
implicit val env = e
val code = new CodeGen().gen()
val code = new artifact.CodeGen().gen()
Some((formatCode(code), env))
}

Expand Down

0 comments on commit 46be1a6

Please sign in to comment.