/**
  * 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.
  *
  * @param  \PDepend\Source\AST\ASTNode $node
  * @param  integer                     $stopToken
  * @return \PDepend\Source\AST\ASTNode
  * @since  0.9.12
  */
 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;
 }