PDepend\Source\Language\PHP\AbstractPHPParser::parseEscapedAstLiteralString PHP Method

parseEscapedAstLiteralString() private method

This method parses an escaped sequence of literal tokens.
Since: 0.9.10
private parseEscapedAstLiteralString ( ) : PDepend\Source\AST\ASTLiteral
return PDepend\Source\AST\ASTLiteral
    private function parseEscapedAstLiteralString()
    {
        $this->tokenStack->push();
        $image = $this->consumeToken(Tokens::T_BACKSLASH)->image;
        $escape = true;
        $tokenType = $this->tokenizer->peek();
        while ($tokenType != Tokenizer::T_EOF) {
            if ($tokenType === Tokens::T_BACKSLASH) {
                $escape != $escape;
                $image .= $this->consumeToken(Tokens::T_BACKSLASH)->image;
                $tokenType = $this->tokenizer->peek();
                continue;
            }
            if ($escape) {
                $image .= $this->consumeToken($tokenType)->image;
                break;
            }
        }
        return $this->setNodePositionsAndReturn($this->builder->buildAstLiteral($image));
    }
AbstractPHPParser