File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/scala/scalaparsers Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ trait Parsing[S] {
285
285
private def charLetter = satisfy(c => (c != '\' ' ) && (c != '\\ ' ) && (c > '\u0016 ' ))
286
286
private def charChar = (charLetter | charEscape) scope " character literal character"
287
287
private def stringLetter = satisfy(c => (c != '"' ) && (c != '\\ ' ) && (c > '\u0016 ' ))
288
- private def stringEscape = ch( '\\ ' ) >> (
288
+ private def stringEscape = satisfy(_ == '\\ ' ) >> (
289
289
(simpleSpace.skipSome >> (ch('\\ ' ) scope " end of string gap" )).as(None ) | // escape gap
290
290
ch('&' ).as(None ) | // empty escape
291
291
escapeCode.map(Some (_))
@@ -302,7 +302,7 @@ trait Parsing[S] {
302
302
.slice
303
303
.interspersedWith(stringEscape.map(_.fold(" " )(_ toString)))
304
304
.map(_ mkString)
305
- .between('"' ,'"' )
305
+ .between('"' ,'"' scope " end of string literal " )
306
306
.scope(" string literal" ))
307
307
308
308
/** Format a string back to its equivalent literal form. */
You can’t perform that action at this time.
0 commit comments