예제 #1
0
 /**
  * @dataProvider expressionParser
  */
 public function testExpressionParser($tokens, $nodes)
 {
     # Append EOF Token
     $tokens[] = new Token(null, '', TokenTypes::T_EOF, 0, 0);
     $parser = new Parser(new TokenStream($tokens), $this->getEnvironment()->addExtension(new Core()));
     $expr = new Parser\ExpressionParser($parser);
     $node = $expr->parseExpression();
     $this->assertEquals($nodes, $node);
 }
예제 #2
0
 public function parseExpression()
 {
     return $this->expressionParser->parseExpression();
 }