aboutsummaryrefslogblamecommitdiff
path: root/src/main/scala/scalam/m/MatlabInterpreter.scala
blob: 2b055e21b738f6db162fa7c7407d8925bcf8aceb (plain) (tree)
1
2
3
4
5
6
7
8
9

                
            

                       
                                                                                            
                                                        
                
                                          


                 
  



                                                   
 
package scalam.m

import ast._
import scalax.file.Path

class MatlabInterpreter(pwd: Path) extends Interpreter("matlab -nosplash -nodesktop", pwd) {
  def evaluate(root: ast.Root) = write(root.line + "\n")
  def exit() = {
    val cmd = Function(Identifier("exit"))
    evaluate(cmd)
    super.close()
  }
  
}

object MatlabInterpreter {
  final val command = "matlab -nosplash -nodesktop"
}