@@ 2811-2819 (lines=9) @@ | ||
2808 | */ |
|
2809 | public function ArithmeticPrimary() |
|
2810 | { |
|
2811 | if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { |
|
2812 | $this->match(Lexer::T_OPEN_PARENTHESIS); |
|
2813 | ||
2814 | $expr = $this->SimpleArithmeticExpression(); |
|
2815 | ||
2816 | $this->match(Lexer::T_CLOSE_PARENTHESIS); |
|
2817 | ||
2818 | return new AST\ParenthesisExpression($expr); |
|
2819 | } |
|
2820 | ||
2821 | switch ($this->lexer->lookahead['type']) { |
|
2822 | case Lexer::T_COALESCE: |
|
@@ 2869-2875 (lines=7) @@ | ||
2866 | $peek = $this->lexer->glimpse(); |
|
2867 | ||
2868 | // Subselect |
|
2869 | if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && $peek['type'] === Lexer::T_SELECT) { |
|
2870 | $this->match(Lexer::T_OPEN_PARENTHESIS); |
|
2871 | $expr = $this->Subselect(); |
|
2872 | $this->match(Lexer::T_CLOSE_PARENTHESIS); |
|
2873 | ||
2874 | return $expr; |
|
2875 | } |
|
2876 | ||
2877 | // ResultVariable (string) |
|
2878 | if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER) && |