File tree Expand file tree Collapse file tree 3 files changed +1
-35
lines changed
main/scala/scala/util/parsing/combinator
test/scala/scala/util/parsing/combinator Expand file tree Collapse file tree 3 files changed +1
-35
lines changed Original file line number Diff line number Diff line change 11import com .typesafe .tools .mima .plugin .{MimaPlugin , MimaKeys }
2- import com .typesafe .tools .mima .core .{ProblemFilters , MissingMethodProblem }
32
43scalaModuleSettings
54
@@ -32,5 +31,3 @@ test in Test := {
3231 MimaKeys .reportBinaryIssues.value
3332 (test in Test ).value
3433}
35-
36- MimaKeys .binaryIssueFilters += ProblemFilters .exclude[MissingMethodProblem ](" scala.util.parsing.combinator.RegexParsers.scala$util$parsing$combinator$RegexParsers$$super$err" )
Original file line number Diff line number Diff line change @@ -137,22 +137,6 @@ trait RegexParsers extends Parsers {
137137 }
138138 }
139139
140- // we might want to make it public/protected in a future version
141- private def ws [T ](p : Parser [T ]): Parser [T ] = new Parser [T ] {
142- def apply (in : Input ) = {
143- val offset = in.offset
144- val start = handleWhiteSpace(in.source, offset)
145- p(in.drop (start - offset))
146- }
147- }
148-
149- /**
150- * @inheritdoc
151- *
152- * This parser additionnal skips whitespace if `skipWhitespace` returns true.
153- */
154- override def err (msg : String ) = ws(super .err(msg))
155-
156140 override def phrase [T ](p : Parser [T ]): Parser [T ] =
157141 super .phrase(p <~ opt(""" \z""" .r))
158142
Original file line number Diff line number Diff line change 11package scala .util .parsing .combinator
22
33import org .junit .Test
4- import org .junit .Assert .{ assertEquals , assertTrue }
4+ import org .junit .Assert .assertEquals
55
66class RegexParsersTest {
77 @ Test
@@ -73,19 +73,4 @@ class RegexParsersTest {
7373 val success = parseAll(twoWords, " first second" ).asInstanceOf [Success [(String , String )]]
7474 assertEquals((" second" , " first" ), success.get)
7575 }
76-
77- @ Test
78- def errorConsumesWhitespace : Unit = {
79- object parser extends RegexParsers {
80- def num = " \\ d+" .r
81-
82- def twoNums = num ~ (num | err(" error!" ))
83- }
84- import parser ._
85-
86- // this used to return a Failure (for the second num)
87- val error = parseAll(twoNums, " 458 bar" )
88- assertTrue(s " expected an Error but got: ${error.getClass.getName}" , error.isInstanceOf [Error ])
89- assertEquals(" error!" , error.asInstanceOf [Error ].msg)
90- }
9176}
You can’t perform that action at this time.
0 commit comments