1
- package dotty .tools .languageserver
1
+ package dotty .tools .dotc . util
2
2
3
3
import dotty .tools .dotc .core .Comments .{Comment , CommentsContext }
4
4
import dotty .tools .dotc .core .Contexts .Context
5
5
import dotty .tools .dotc .core .Names .TermName
6
6
import dotty .tools .dotc .core .Symbols ._
7
- import dotty .tools .dotc .util .CommentParsing
8
7
9
8
import scala .collection .immutable .ListMap
10
9
import scala .util .matching .Regex
@@ -59,7 +58,7 @@ class ParsedComment(val comment: Comment) {
59
58
for {
60
59
(tag, formatter) <- ParsedComment .knownTags
61
60
boundss <- groupedSections.get(tag)
62
- texts = boundss.map { (start, end) => clean(content.slice(start, end)) }
61
+ texts = boundss.map { case (start, end) => clean(content.slice(start, end)) }
63
62
formatted <- formatter(texts)
64
63
} {
65
64
buf.append(formatted)
@@ -75,7 +74,7 @@ class ParsedComment(val comment: Comment) {
75
74
* @param name The parameter name whose documentation to extract.
76
75
* @return The formatted documentation corresponding to `name`.
77
76
*/
78
- def paramDoc (name : TermName ): Option [String ] = paramDocs.get(name.toString).map { (start, end) =>
77
+ def paramDoc (name : TermName ): Option [String ] = paramDocs.get(name.toString).map { case (start, end) =>
79
78
val rawContent = content.slice(start, end)
80
79
val docContent = ParsedComment .prefixRegex.replaceFirstIn(rawContent, " " )
81
80
clean(docContent)
0 commit comments