ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
public ArithmeticFactor ( ) : Doctrine\ORM\Query\AST\ArithmeticFactor | ||
return | Doctrine\ORM\Query\AST\ArithmeticFactor |
public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->expressions[] = $parser->ArithmeticFactor(); $parser->match(Lexer::T_COMMA); $this->expressions[] = $parser->ArithmeticFactor(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->expressions[] = $parser->ArithmeticFactor(); $lexer = $parser->getLexer(); if ($lexer->lookahead['type'] === Lexer::T_COMMA) { $parser->match(Lexer::T_COMMA); $this->expressions[] = $parser->ArithmeticFactor(); } $parser->match(Lexer::T_CLOSE_PARENTHESIS); }