diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2012-05-18 15:16:33 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2012-05-18 15:50:44 +0200 |
commit | 800bdf81228cf10e6c93ae39030f9edfae96c679 (patch) | |
tree | 7845ab9a80f125cc8b5fb5e99df6cef20bffe3e7 /src | |
parent | ef7708812fac32ca0c2a05330222a6b0806c9054 (diff) | |
download | scala-800bdf81228cf10e6c93ae39030f9edfae96c679.tar.gz scala-800bdf81228cf10e6c93ae39030f9edfae96c679.tar.bz2 scala-800bdf81228cf10e6c93ae39030f9edfae96c679.zip |
Fix 4138
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/util/parsing/combinator/JavaTokenParsers.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/library/scala/util/parsing/combinator/JavaTokenParsers.scala b/src/library/scala/util/parsing/combinator/JavaTokenParsers.scala index bc71391bdb..06567ea348 100644 --- a/src/library/scala/util/parsing/combinator/JavaTokenParsers.scala +++ b/src/library/scala/util/parsing/combinator/JavaTokenParsers.scala @@ -9,6 +9,8 @@ package scala.util.parsing.combinator +import annotation.migration + /** `JavaTokenParsers` differs from [[scala.util.parsing.combinator.RegexParsers]] * by adding the following definitions: * @@ -39,12 +41,13 @@ trait JavaTokenParsers extends RegexParsers { /** Double quotes (`"`) enclosing a sequence of: * * - Any character except double quotes, control characters or backslash (`\`) - * - A backslash followed by a slash, another backslash, or one of the letters - * `b`, `f`, `n`, `r` or `t`. + * - A backslash followed by another backslash, a single or double quote, or one + * of the letters `b`, `f`, `n`, `r` or `t` * - `\` followed by `u` followed by four hexadecimal digits */ + @migration("`stringLiteral` allows escaping single and double quotes, but not forward slashes any longer.", "2.10.0") def stringLiteral: Parser[String] = - ("\""+"""([^"\p{Cntrl}\\]|\\[\\/bfnrt]|\\u[a-fA-F0-9]{4})*"""+"\"").r + ("\""+"""([^"\p{Cntrl}\\]|\\[\\'"bfnrt]|\\u[a-fA-F0-9]{4})*"""+"\"").r /** A number following the rules of `decimalNumber`, with the following * optional additions: * |