Skip to content

Commit 206b1b2

Browse files
committed
Restore Scanner.commentSpans to preserve source/binary compatibility in 3.3.x minor
1 parent 2753a17 commit 206b1b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/src/dotty/tools/dotc/parsing/Scanners.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ object Scanners {
233233
/** Return a list of all the comments */
234234
def comments: List[Comment] = commentBuf.toList
235235

236+
/** Return a list of all the comment positions */
237+
@deprecated("Use `comments` to get rich information source comments", since = "3.3.2")
238+
def commentSpans: List[Span] = comments.map(_.span)
239+
236240
private def addComment(comment: Comment): Unit = {
237241
val lookahead = lookaheadReader()
238242
def nextPos: Int = (lookahead.getc(): @switch) match {

0 commit comments

Comments
 (0)