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