Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9a92a5d

Browse files
author
Paul Wagland
committed
Change stringLiteral to match possessively, this eliminates recursion in the regex engine.
1 parent de5f638 commit 9a92a5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/main/scala/scala/util/parsing/combinator/JavaTokenParsers.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ trait JavaTokenParsers extends RegexParsers {
4949
*/
5050
@migration("`stringLiteral` allows escaping single and double quotes, but not forward slashes any longer.", "2.10.0")
5151
def stringLiteral: Parser[String] =
52-
("\""+"""([^"\p{Cntrl}\\]|\\[\\'"bfnrt]|\\u[a-fA-F0-9]{4})*"""+"\"").r
52+
("\""+"""([^"\p{Cntrl}\\]|\\[\\'"bfnrt]|\\u[a-fA-F0-9]{4})*+"""+"\"").r
5353
/** A number following the rules of `decimalNumber`, with the following
5454
* optional additions:
5555
*

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /