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 preps
.flatMap(p => .flatMap(p =>
p.model.resolveFunctions p.model.resolveFunctions
.map(fc => FuncAirGen(fc).generateAir(bodyConfig).show) .map(fc => (fc.funcName -> FuncAirGen(fc).generateAir(bodyConfig).show))
.map { generated => .map { case (fnName, generated) =>
val tpV = p.targetPath("ts") val tpV = p.targetPath(fnName + ".air")
tpV match { tpV match {
case Invalid(t) => case Invalid(t) =>
EitherT.pure(t.getMessage) EitherT.pure(t.getMessage)