src/Jit/Parser.php
protected function _stringNode($delimiter = '', $heredoc = false)
    {
        $this->_codeNode();
        $token = $this->_stream->current(true);
        if (!$delimiter) {
            $this->_states['body'] = $token[1];
        } elseif ($delimiter === '"') {
            $this->_states['body'] = $token[1] . $this->_stream->next('"');
        } else {
            $this->_states['body'] = $token[1] . $this->_stream->nextSequence($delimiter);
        }
        if ($heredoc) {
            $this->_states['body'] .= $this->_stream->next([';']);
        }

        $node = new NodeDef($this->_states['body'], 'string');
        $this->_contextualize($node);
        return $node;
    }
protected function _stringNode($delimiter = '', $heredoc = false)
    {
        $this->_codeNode();
        $token = $this->_stream->current(true);
        if (!$delimiter) {
            $this->_states['body'] = $token[1];
        } elseif ($delimiter === '"') {
            $this->_states['body'] = $token[1] . $this->_stream->next('"');
        } else {
            $this->_states['body'] = $token[1] . $this->_stream->nextSequence($delimiter);
        }
        if ($heredoc) {
            $this->_states['body'] .= $this->_stream->next([';']);
        }

        $node = new NodeDef($this->_states['body'], 'string');
        $this->_contextualize($node);
        return $node;
    }
protected function _stringNode ( $ delimiter = '' , $ heredoc = false ) { $ this -> _codeNode ( ) ; $ token = $ this -> _stream -> current ( true ) ; if ( ! $ delimiter ) { $ this -> _states [ 'body' ] = $ token [ 1 ] ; } elseif ( $ delimiter === '"' ) { $ this -> _states [ 'body' ] = $ token [ 1 ] . $ this -> _stream -> next ( '"' ) ; } else { $ this -> _states [ 'body' ] = $ token [ 1 ] . $ this -> _stream -> nextSequence ( $ delimiter ) ; } if ( $ heredoc ) { $ this -> _states [ 'body' ] .= $ this -> _stream -> next ( [ ';' ] ) ; } $ node = new NodeDef ( $ this -> _states [ 'body' ] , 'string' ) ; $ this -> _contextualize ( $ node ) ; return $ node ; }
Build a string node.
Build a string node .