parse() public method

Parse the specified transformation file into an AST.
public parse ( string $file ) : array
$file string
return array
 /**
  * Loads rules.
  *
  * @return array
  */
 protected function getRules()
 {
     if ($this->compiledRules === null) {
         $rules = array();
         foreach ($this->ruleFiles as $file) {
             $rules = array_merge($rules, $this->parser->parse($file));
         }
         $this->compiledRules = $this->compiler->compile($rules);
     }
     return $this->compiledRules;
 }
 /**
  * @dataProvider getTestFiles
  */
 public function testParse($file)
 {
     $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser();
     $fixture = (include $file . '.result');
     $this->assertEquals($fixture, $parser->parse($file));
 }