QuackCompiler\Parser\Grammar::_caseStmtList PHP Метод

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

public _caseStmtList ( )
    public function _caseStmtList()
    {
        $cases = [Tag::T_CASE, Tag::T_ELSE];
        while (in_array($this->parser->lookahead->getTag(), $cases, true)) {
            $is_else = $this->parser->is(Tag::T_ELSE);
            $this->parser->consume();
            $value = $is_else ? null : $this->_expr();
            $body = new StmtList(iterator_to_array($this->_innerStmtList()));
            (yield new CaseStmt($value, $body, $is_else));
        }
    }