ConstExprParser: fix building ConstFetchNode

This commit is contained in:
Jan Tvrdik 2017-11-18 17:31:57 +01:00
parent 97250e6dcc
commit 95787df9bf

View File

@ -49,7 +49,7 @@ class ConstExprParser
if ($tokens->tryConsumeTokenType(Lexer::TOKEN_DOUBLE_COLON)) {
$classConstantName = $tokens->currentTokenValue();
$tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
return new Ast\ConstExpr\ConstFetchNode($classConstantName, $identifier);
return new Ast\ConstExpr\ConstFetchNode($identifier, $classConstantName);
} else {
return new Ast\ConstExpr\ConstFetchNode('', $identifier);