src/Jit/Parser.php
protected function _declareNode()
    {
        $this->_codeNode();
        $body = $this->_stream->current() . $this->_stream->next([';', '{']);

        if (preg_match('~ticks~i', $body, $matches)) {
            $isBlock = substr($body, -1) === '{';
            if ($isBlock) {
                $body = substr($body, 0, -1);
            }
            $node = new NodeDef($body, 'declare');
            $this->_contextualize($node);

            if ($isBlock) {
                $this->_states['body'] .= '{';
                $this->_states['current'] = $this->_codeNode();
            }
            return $node;
        }
        $this->_states['body'] .= $body;
        $node = new BlockDef($body, 'declare');
        $node->hasMethods = false;
        $this->_states['current'] = $this->_root;
        $this->_contextualize($node);
        return $this->_states['current'] = $node;
    }
protected function _declareNode()
    {
        $this->_codeNode();
        $body = $this->_stream->current() . $this->_stream->next([';', '{']);

        if (preg_match('~ticks~i', $body, $matches)) {
            $isBlock = substr($body, -1) === '{';
            if ($isBlock) {
                $body = substr($body, 0, -1);
            }
            $node = new NodeDef($body, 'declare');
            $this->_contextualize($node);

            if ($isBlock) {
                $this->_states['body'] .= '{';
                $this->_states['current'] = $this->_codeNode();
            }
            return $node;
        }
        $this->_states['body'] .= $body;
        $node = new BlockDef($body, 'declare');
        $node->hasMethods = false;
        $this->_states['current'] = $this->_root;
        $this->_contextualize($node);
        return $this->_states['current'] = $node;
    }
protected function _declareNode ( ) { $ this -> _codeNode ( ) ; $ body = $ this -> _stream -> current ( ) . $ this -> _stream -> next ( [ ';' , '{' ] ) ; if ( preg_match ( '~ticks~i' , $ body , $ matches ) ) { $ isBlock = substr ( $ body , - 1 ) === '{' ; if ( $ isBlock ) { $ body = substr ( $ body , 0 , - 1 ) ; } $ node = new NodeDef ( $ body , 'declare' ) ; $ this -> _contextualize ( $ node ) ; if ( $ isBlock ) { $ this -> _states [ 'body' ] .= '{' ; $ this -> _states [ 'current' ] = $ this -> _codeNode ( ) ; } return $ node ; } $ this -> _states [ 'body' ] .= $ body ; $ node = new BlockDef ( $ body , 'declare' ) ; $ node -> hasMethods = false ; $ this -> _states [ 'current' ] = $ this -> _root ; $ this -> _contextualize ( $ node ) ; return $ this -> _states [ 'current' ] = $ node ; }
Build a declare node.
Build a declare node .