private function processDeclare()
{
$declareId = $this->addAtom('Declare');
$current = $this->id;
++$this->id;
// Skip declare
$argsId = $this->processArguments();
$this->addLink($declareId, $argsId, 'DECLARE');
$isColon = $this->tokens[$current][0] === T_DECLARE && $this->tokens[$this->id + 1][0] === T_COLON;
$blockId = $this->processFollowingBlock(array(T_ENDDECLARE));
$this->popExpression();
$this->addLink($declareId, $blockId, 'BLOCK');
if ($isColon === true) {
$fullcode = $this->tokens[$current][1] . ' (' . $this->atoms[$argsId]['fullcode'] . ') : ' . self::FULLCODE_SEQUENCE . ' ' . $this->tokens[$this->id + 1][1];
++$this->id;
// skip enddeclare
++$this->id;
// skip ;
} else {
$fullcode = $this->tokens[$current][1] . ' (' . $this->atoms[$argsId]['fullcode'] . ') ' . self::FULLCODE_BLOCK;
}
$this->pushExpression($declareId);
$this->processSemicolon();
$this->setAtom($declareId, array('code' => $this->tokens[$current][1], 'fullcode' => $fullcode, 'line' => $this->tokens[$current][2], 'token' => $this->getToken($this->tokens[$current][0]), 'alternative' => $isColon));
return $declareId;
}