Mercurial > hg > cmmr2012-drupal-site
diff vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php Thu Feb 28 13:11:55 2019 +0000 @@ -134,29 +134,6 @@ } throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); } - - /** - * @internal - * - * Parses a constant doc string. - * - * @param string $startToken Doc string start token content (<<<SMTHG) - * @param string $str String token content - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string Parsed string - */ - public static function parseDocString(string $startToken, string $str, bool $parseUnicodeEscape = true) : string { - // strip last newline (thanks tokenizer for sticking it into the string!) - $str = preg_replace('~(\r\n|\n|\r)\z~', '', $str); - - // nowdoc string - if (false !== strpos($startToken, '\'')) { - return $str; - } - - return self::parseEscapeSequences($str, null, $parseUnicodeEscape); - } public function getType() : string { return 'Scalar_String';