Exemple #1
0
 /**
  * Construct a new instance
  *
  * Note: this will construct a number of dependencies automatically
  */
 public function __construct()
 {
     $this->analyzer = Analyzer\Factory::analyzer();
     $this->astParser = new AstParser(new AstLexer());
     $this->nameResolver = new AstTraverser();
     $this->nameResolver->addVisitor(new AstNameResolver());
     $this->parser = Parser\Factory::parser();
     $this->generator = new Intermediary\Generator();
     if (class_exists('JITFU\\Func')) {
         $this->jitfucompiler = new Compiler\JitFu\Compiler($this);
     }
     $this->phpcompiler = new Compiler\PHP\Compiler();
 }
Exemple #2
0
 /**
  * @covers ::analyzer
  */
 public function testFactory()
 {
     $this->assertInstanceOf(Analyzer::class, Factory::analyzer());
 }