Skip to content

Commit

Permalink
Restore Scanner.commentSpans to preserve source/binary compatibilit…
Browse files Browse the repository at this point in the history
…y in 3.3.x minor
  • Loading branch information
WojciechMazur committed Jul 17, 2023
1 parent 2753a17 commit 206b1b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/src/dotty/tools/dotc/parsing/Scanners.scala
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ object Scanners {
/** Return a list of all the comments */
def comments: List[Comment] = commentBuf.toList

/** Return a list of all the comment positions */
@deprecated("Use `comments` to get rich information source comments", since = "3.3.2")
def commentSpans: List[Span] = comments.map(_.span)

private def addComment(comment: Comment): Unit = {
val lookahead = lookaheadReader()
def nextPos: Int = (lookahead.getc(): @switch) match {
Expand Down

0 comments on commit 206b1b2

Please sign in to comment.