diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-05 22:38:20 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-05 22:38:20 -0800 |
commit | 5be13bf0e0a2df0ddeda7652db0f54c0cba6c3bf (patch) | |
tree | 60e8b478d7f8eda0a407d1a4668de6a14ed22e83 /src | |
parent | 9d00ea8d389f4426f1f644e0a7f48e9ea380e9fc (diff) | |
download | scala-5be13bf0e0a2df0ddeda7652db0f54c0cba6c3bf.tar.gz scala-5be13bf0e0a2df0ddeda7652db0f54c0cba6c3bf.tar.bz2 scala-5be13bf0e0a2df0ddeda7652db0f54c0cba6c3bf.zip |
Revert "Scaladoc @usecase annotation overriding / SI-5287"
This reverts commit 7946ac410ad74894cd0eb6dfd29447f173911b99.
Diffstat (limited to 'src')
-rwxr-xr-x | src/compiler/scala/tools/nsc/util/DocStrings.scala | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/compiler/scala/tools/nsc/util/DocStrings.scala b/src/compiler/scala/tools/nsc/util/DocStrings.scala index 2c8b77be71..1db6c38b4d 100755 --- a/src/compiler/scala/tools/nsc/util/DocStrings.scala +++ b/src/compiler/scala/tools/nsc/util/DocStrings.scala @@ -71,35 +71,13 @@ object DocStrings { * Every section starts with a `@` and extends to the next `@`, or * to the end of the comment string, but excluding the final two * characters which terminate the comment. - * - * Also take usecases into account - they need to expand until the next - * @usecase or the end of the string, as they might include other sections - * of their own */ def tagIndex(str: String, p: Int => Boolean = (idx => true)): List[(Int, Int)] = findAll(str, 0) (idx => str(idx) == '@' && p(idx)) match { case List() => List() - case idxs => { - val idxs2 = mergeUsecaseSections(str, idxs) - idxs2 zip (idxs2.tail ::: List(str.length - 2)) - } - } - - /** - * Merge sections following an @usecase into the usecase comment, so they - * can override the parent symbol's sections - */ - def mergeUsecaseSections(str: String, idxs: List[Int]): List[Int] = { - idxs.find(str.substring(_).startsWith("@usecase")) match { - case Some(firstUC) => - val commentSections = idxs.take(idxs.indexOf(firstUC)) - val usecaseSections = idxs.drop(idxs.indexOf(firstUC)).filter(str.substring(_).startsWith("@usecase")) - commentSections ::: usecaseSections - case None => - idxs + case idxs => idxs zip (idxs.tail ::: List(str.length - 2)) } - } - + /** Does interval `iv` start with given `tag`? */ def startsWithTag(str: String, section: (Int, Int), tag: String): Boolean = |