PHPCfg\Parser::parseStmt_While PHP Method

parseStmt_While() protected method

protected parseStmt_While ( PhpParser\Node\Stmt\While_ $node )
$node PhpParser\Node\Stmt\While_
    protected function parseStmt_While(Stmt\While_ $node)
    {
        $loopInit = new Block();
        $loopBody = new Block();
        $loopEnd = new Block();
        $this->block->children[] = new Jump($loopInit, $this->mapAttributes($node));
        $loopInit->addParent($this->block);
        $this->block = $loopInit;
        $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 = $this->parseNodes($node->stmts, $loopBody);
        $this->block->children[] = new Jump($loopInit, $this->mapAttributes($node));
        $loopInit->addParent($this->block);
        $this->block = $loopEnd;
    }
Parser