protected function parseConstant()
{
$this->tokenStack->push();
switch ($type = $this->tokenizer->peek()) {
case Tokens::T_STRING:
// TODO: Separate node classes for magic constants
// TODO: Separate node classes for magic constants
case Tokens::T_DIR:
case Tokens::T_FILE:
case Tokens::T_LINE:
case Tokens::T_NS_C:
case Tokens::T_FUNC_C:
case Tokens::T_CLASS_C:
case Tokens::T_METHOD_C:
$token = $this->consumeToken($type);
$const = $this->builder->buildAstConstant($token->image);
break;
}
return $this->setNodePositionsAndReturn($const);
}