extension for air target (#143)

This commit is contained in:
Dima 2021-06-01 12:34:13 +03:00 committed by GitHub
parent 582dab20b7
commit 6ba9c13c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,9 +160,9 @@ object AquaCompiler extends LogSupport {
preps
.flatMap(p =>
p.model.resolveFunctions
.map(fc => FuncAirGen(fc).generateAir(bodyConfig).show)
.map { generated =>
val tpV = p.targetPath("ts")
.map(fc => (fc.funcName -> FuncAirGen(fc).generateAir(bodyConfig).show))
.map { case (fnName, generated) =>
val tpV = p.targetPath(fnName + ".air")
tpV match {
case Invalid(t) =>
EitherT.pure(t.getMessage)