Permalink
Browse files

fix warnings in Scala 2.13.0-M5

  • Loading branch information...
xuwei-k committed Sep 16, 2018
1 parent b0b2a7d commit 89a22d36d494b6da128730002e2a4bcbc6df9334
Showing with 4 additions and 4 deletions.
  1. +4 −4 parboiled-core/src/main/scala/org/parboiled2/ErrorFormatter.scala
@@ -186,7 +186,7 @@ class ErrorFormatter(showExpected: Boolean = true,
*/
def formatTraces(error: ParseError): String = {
import error._
traces.map(formatTrace(_, position.index)).mkString(traces.size + " rule" + (if (traces.size != 1) "s" else "") +
traces.map(formatTrace(_, position.index)).mkString(s"${traces.size} rule${(if (traces.size != 1) "s" else "")}" +
" mismatched at error location:\n ", "\n ", "\n")
}
@@ -236,7 +236,7 @@ class ErrorFormatter(showExpected: Boolean = true,
case Capture "capture"
case Cut "cut"
case FirstOf "|"
case x: IgnoreCaseString '"' + escape(x.string) + '"'
case x: IgnoreCaseString s""""${escape(x.string)}""""
case x: MapMatch x.map.toString()
case x: Named x.name
case OneOrMore "+"
@@ -246,7 +246,7 @@ class ErrorFormatter(showExpected: Boolean = true,
case Run "<run>"
case RunSubParser "runSubParser"
case Sequence "~"
case x: StringMatch '"' + escape(x.string) + '"'
case x: StringMatch s""""${escape(x.string)}""""
case x: Times "times"
case ZeroOrMore "*"
}
@@ -258,7 +258,7 @@ class ErrorFormatter(showExpected: Boolean = true,
import CharUtils.escape
terminal match {
case ANY "ANY"
case AnyOf(s) '[' + escape(s) + ']'
case AnyOf(s) s"[${escape(s)}]"
case CharMatch(c) "'" + escape(c) + '\''
case CharPredicateMatch(_) "<CharPredicate>"
case CharRange(from, to) s"'${escape(from)}'-'${escape(to)}'"

0 comments on commit 89a22d3

Please sign in to comment.