PDepend\Source\Language\PHP\AbstractPHPParser::parseStringExpressions PHP Метод

parseStringExpressions() приватный Метод

This method parses the contents of a string or here-/now-doc node. It will not consume the given stop token, so it is up to the calling method to consume the stop token. The return value of this method is the prepared input string node.
С версии: 0.9.12
private parseStringExpressions ( PDepend\Source\AST\ASTNode $node, integer $stopToken ) : PDepend\Source\AST\ASTNode
$node PDepend\Source\AST\ASTNode
$stopToken integer
Результат PDepend\Source\AST\ASTNode
    private function parseStringExpressions(ASTNode $node, $stopToken)
    {
        while (($tokenType = $this->tokenizer->peek()) != Tokenizer::T_EOF) {
            switch ($tokenType) {
                case $stopToken:
                    break 2;
                case Tokens::T_BACKSLASH:
                    $node->addChild($this->parseEscapedAstLiteralString());
                    break;
                case Tokens::T_DOLLAR:
                    $node->addChild($this->parseCompoundVariableOrLiteral());
                    break;
                case Tokens::T_VARIABLE:
                    $node->addChild($this->parseVariable());
                    break;
                case Tokens::T_CURLY_BRACE_OPEN:
                    $node->addChild($this->parseCompoundExpressionOrLiteral());
                    break;
                default:
                    $node->addChild($this->parseLiteral());
                    break;
            }
        }
        return $node;
    }
AbstractPHPParser