|
@@ 2123-2127 (lines=5) @@
|
| 2120 |
|
return new AST\Literal(AST\Literal::STRING, $this->lexer->token['value']); |
| 2121 |
|
|
| 2122 |
|
case Lexer::T_INTEGER: |
| 2123 |
|
case Lexer::T_FLOAT: |
| 2124 |
|
$this->match( |
| 2125 |
|
$this->lexer->isNextToken(Lexer::T_INTEGER) ? Lexer::T_INTEGER : Lexer::T_FLOAT |
| 2126 |
|
); |
| 2127 |
|
return new AST\Literal(AST\Literal::NUMERIC, $this->lexer->token['value']); |
| 2128 |
|
|
| 2129 |
|
case Lexer::T_TRUE: |
| 2130 |
|
case Lexer::T_FALSE: |
|
@@ 2130-2134 (lines=5) @@
|
| 2127 |
|
return new AST\Literal(AST\Literal::NUMERIC, $this->lexer->token['value']); |
| 2128 |
|
|
| 2129 |
|
case Lexer::T_TRUE: |
| 2130 |
|
case Lexer::T_FALSE: |
| 2131 |
|
$this->match( |
| 2132 |
|
$this->lexer->isNextToken(Lexer::T_TRUE) ? Lexer::T_TRUE : Lexer::T_FALSE |
| 2133 |
|
); |
| 2134 |
|
return new AST\Literal(AST\Literal::BOOLEAN, $this->lexer->token['value']); |
| 2135 |
|
|
| 2136 |
|
default: |
| 2137 |
|
$this->syntaxError('Literal'); |