Phan\Parse\ParseVisitor::visitConstDecl PHP Метод

visitConstDecl() публичный Метод

Visit a node with kind \ast\AST_CONST
public visitConstDecl ( ast\Node $node ) : Context
$node ast\Node A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node
    public function visitConstDecl(Node $node) : Context
    {
        foreach ($node->children ?? [] as $child_node) {
            $this->addConstant($child_node, $child_node->children['name'], $child_node->children['value'], $child_node->flags ?? 0);
        }
        return $this->context;
    }