diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-05-18 08:10:06 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-05-18 08:10:06 -0700 |
commit | a69bddab88c5a3eb379a9fa605514eee56acc6d3 (patch) | |
tree | f660af0abaf735b9fff8bc2670c0d2044d581cf1 /src/library | |
parent | 34fa132820ddef5d789dd6efd00dc2f3a1d27a63 (diff) | |
parent | 800bdf81228cf10e6c93ae39030f9edfae96c679 (diff) | |
download | scala-a69bddab88c5a3eb379a9fa605514eee56acc6d3.tar.gz scala-a69bddab88c5a3eb379a9fa605514eee56acc6d3.tar.bz2 scala-a69bddab88c5a3eb379a9fa605514eee56acc6d3.zip |
Merge pull request #571 from lrytz/wip/t4138
Fix 4138
Diffstat (limited to 'src/library')
-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: * |