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 7be8876

Browse files
Merge pull request #405 from SethTisue/remove-migration-annotations
remove antiquated @migration annotations
2 parents eccb176 + 35dbc30 commit 7be8876

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
package scala
1414
package util.parsing.combinator
1515

16-
import scala.annotation.migration
17-
1816
/** `JavaTokenParsers` differs from [[scala.util.parsing.combinator.RegexParsers]]
1917
* by adding the following definitions:
2018
*
@@ -55,7 +53,6 @@ trait JavaTokenParsers extends RegexParsers {
5553
* of the letters `b`, `f`, `n`, `r` or `t`
5654
* - `\` followed by `u` followed by four hexadecimal digits
5755
*/
58-
@migration("`stringLiteral` allows escaping single and double quotes, but not forward slashes any longer.", "2.10.0")
5956
def stringLiteral: Parser[String] =
6057
("\""+"""([^"\x00-\x1F\x7F\\]|\\[\\'"bfnrt]|\\u[a-fA-F0-9]{4})*"""+"\"").r
6158

‎shared/src/main/scala/scala/util/parsing/combinator/Parsers.scala‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package util.parsing.combinator
1616
import scala.util.parsing.input._
1717
import scala.collection.mutable.ListBuffer
1818
import scala.annotation.tailrec
19-
import scala.annotation.migration
2019
import scala.language.implicitConversions
2120

2221
// TODO: better error handling (labelling like parsec's <?>)
@@ -265,7 +264,6 @@ trait Parsers {
265264

266265
// no filter yet, dealing with zero is tricky!
267266

268-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
269267
def append[U >: T](p0: => Parser[U]): Parser[U] = { lazy val p = p0 // lazy argument
270268
Parser{ in => this(in) append p(in)}
271269
}
@@ -284,7 +282,6 @@ trait Parsers {
284282
* but easier to pattern match on) that contains the result of `p` and
285283
* that of `q`. The resulting parser fails if either `p` or `q` fails.
286284
*/
287-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
288285
def ~ [U](q: => Parser[U]): Parser[~[T, U]] = { lazy val p = q // lazy argument
289286
(for(a <- this; b <- p) yield new ~(a,b)).named("~")
290287
}
@@ -297,7 +294,6 @@ trait Parsers {
297294
* succeeds -- evaluated at most once, and only when necessary.
298295
* @return a `Parser` that -- on success -- returns the result of `q`.
299296
*/
300-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
301297
def ~> [U](q: => Parser[U]): Parser[U] = { lazy val p = q // lazy argument
302298
(for(a <- this; b <- p) yield b).named("~>")
303299
}
@@ -312,7 +308,6 @@ trait Parsers {
312308
* @param q a parser that will be executed after `p` (this parser) succeeds -- evaluated at most once, and only when necessary
313309
* @return a `Parser` that -- on success -- returns the result of `p`.
314310
*/
315-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
316311
def <~ [U](q: => Parser[U]): Parser[T] = { lazy val p = q // lazy argument
317312
(for(a <- this; b <- p) yield a).named("<~")
318313
}
@@ -355,7 +350,6 @@ trait Parsers {
355350
* @return a `Parser` that -- on success -- reutrns the result of `q`.
356351
* The resulting parser fails if either `p` or `q` fails, this failure is fatal.
357352
*/
358-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
359353
def ~>! [U](q: => Parser[U]): Parser[U] = { lazy val p = q // lazy argument
360354
OnceParser { (for(a <- this; b <- commit(p)) yield b).named("~>!") }
361355
}
@@ -369,7 +363,6 @@ trait Parsers {
369363
* @return a `Parser` that -- on success -- reutrns the result of `p`.
370364
* The resulting parser fails if either `p` or `q` fails, this failure is fatal.
371365
*/
372-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
373366
def <~! [U](q: => Parser[U]): Parser[T] = { lazy val p = q // lazy argument
374367
OnceParser { (for(a <- this; b <- commit(p)) yield a).named("<~!") }
375368
}
@@ -396,7 +389,6 @@ trait Parsers {
396389
* @param q0 a parser that accepts if p consumes less characters. -- evaluated at most once, and only when necessary
397390
* @return a `Parser` that returns the result of the parser consuming the most characters (out of `p` and `q`).
398391
*/
399-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
400392
def ||| [U >: T](q0: => Parser[U]): Parser[U] = new Parser[U] {
401393
lazy val q = q0 // lazy argument
402394
def apply(in: Input) = {
@@ -433,7 +425,6 @@ trait Parsers {
433425
* @param v The new result for the parser, evaluated at most once (if `p` succeeds), not evaluated at all if `p` fails.
434426
* @return a parser that has the same behaviour as the current parser, but whose successful result is `v`
435427
*/
436-
@migration("The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
437428
def ^^^ [U](v: => U): Parser[U] = new Parser[U] {
438429
lazy val v0 = v // lazy argument
439430
def apply(in: Input) = Parser.this(in) map (x => v0)
@@ -772,7 +763,6 @@ trait Parsers {
772763
* @return A parser that returns a list of results produced by first applying `f` and then
773764
* repeatedly `p` to the input (it only succeeds if `f` matches).
774765
*/
775-
@migration("The `p0` call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.", "2.9.0")
776766
def rep1[T](first: => Parser[T], p0: => Parser[T]): Parser[List[T]] = Parser { in =>
777767
lazy val p = p0 // lazy argument
778768
val elems = new ListBuffer[T]

0 commit comments

Comments
(0)

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