PHPCfg\Parser::parseStmt_Do PHP Method

parseStmt_Do() protected method

protected parseStmt_Do ( PhpParser\Node\Stmt\Do_ $node )
$node PhpParser\Node\Stmt\Do_
    protected function parseStmt_Do(Stmt\Do_ $node)
    {
        $loopBody = new Block($this->block);
        $loopEnd = new Block();
        $this->block->children[] = new Jump($loopBody, $this->mapAttributes($node));
        $loopBody->addParent($this->block);
        $this->block = $loopBody;
        $this->block = $this->parseNodes($node->stmts, $loopBody);
        $cond = $this->readVariable($this->parseExprNode($node->cond));
        $this->block->children[] = new JumpIf($cond, $loopBody, $loopEnd, $this->mapAttributes($node));
        $this->processAssertions($cond, $loopBody, $loopEnd);
        $loopBody->addParent($this->block);
        $loopEnd->addParent($this->block);
        $this->block = $loopEnd;
    }
Parser