hamzaremmal/amy

View on GitHub
interpreter/src/main/scala/amyc/runner.scala

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
package amyc

import amyc.core.Context.inFreshContext
import amyc.utils.Pipeline.execute
import amyc.utils.error.checkAmycErrors
import amyc.utils.{FetchFiles, Frontend, Pipeline}
import amyc.interpreter.Interpreter

object runner {

  lazy val pipeline: Pipeline[List[String], Unit] =
    FetchFiles andThen
    Frontend andThen
    Interpreter

  def main(args: Array[String]): Unit =
    inFreshContext {
      checkAmycErrors {
        execute(pipeline) {
          args.toList
        }
      }
    }

}