|
@@ 6155-6165 (lines=11) @@
|
| 6152 |
|
$definition = $this->builder->buildAstConstantDefinition($token->image); |
| 6153 |
|
$definition->setComment($this->docComment); |
| 6154 |
|
|
| 6155 |
|
do { |
| 6156 |
|
$definition->addChild($this->parseConstantDeclarator()); |
| 6157 |
|
|
| 6158 |
|
$this->consumeComments(); |
| 6159 |
|
$tokenType = $this->tokenizer->peek(); |
| 6160 |
|
|
| 6161 |
|
if ($tokenType === Tokens::T_SEMICOLON) { |
| 6162 |
|
break; |
| 6163 |
|
} |
| 6164 |
|
$this->consumeToken(Tokens::T_COMMA); |
| 6165 |
|
} while ($tokenType !== Tokenizer::T_EOF); |
| 6166 |
|
|
| 6167 |
|
|
| 6168 |
|
$definition = $this->setNodePositionsAndReturn($definition); |
|
@@ 5279-5292 (lines=14) @@
|
| 5276 |
|
return $this->setNodePositionsAndReturn($formalParameters); |
| 5277 |
|
} |
| 5278 |
|
|
| 5279 |
|
while ($tokenType !== Tokenizer::T_EOF) { |
| 5280 |
|
$formalParameters->addChild( |
| 5281 |
|
$this->parseFormalParameterOrTypeHintOrByReference() |
| 5282 |
|
); |
| 5283 |
|
|
| 5284 |
|
$this->consumeComments(); |
| 5285 |
|
$tokenType = $this->tokenizer->peek(); |
| 5286 |
|
|
| 5287 |
|
// Check for following parameter |
| 5288 |
|
if ($tokenType !== Tokens::T_COMMA) { |
| 5289 |
|
break; |
| 5290 |
|
} |
| 5291 |
|
$this->consumeToken(Tokens::T_COMMA); |
| 5292 |
|
} |
| 5293 |
|
$this->consumeToken(Tokens::T_PARENTHESIS_CLOSE); |
| 5294 |
|
|
| 5295 |
|
return $this->setNodePositionsAndReturn($formalParameters); |
|
@@ 6348-6360 (lines=13) @@
|
| 6345 |
|
// Fetch next token type |
| 6346 |
|
$tokenType = $this->tokenizer->peek(); |
| 6347 |
|
|
| 6348 |
|
while ($tokenType !== Tokenizer::T_EOF) { |
| 6349 |
|
$staticDeclaration->addChild($this->parseVariableDeclarator()); |
| 6350 |
|
|
| 6351 |
|
$this->consumeComments(); |
| 6352 |
|
|
| 6353 |
|
// Semicolon terminates static declaration |
| 6354 |
|
$tokenType = $this->tokenizer->peek(); |
| 6355 |
|
if ($tokenType === Tokens::T_SEMICOLON) { |
| 6356 |
|
break; |
| 6357 |
|
} |
| 6358 |
|
// We are here, so there must be a next declarator |
| 6359 |
|
$this->consumeToken(Tokens::T_COMMA); |
| 6360 |
|
} |
| 6361 |
|
|
| 6362 |
|
return $staticDeclaration; |
| 6363 |
|
} |