Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Scanner.commentSpans #18224

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 comment positions */
def commentSpans: List[Span] = commentPosBuf.toList

/** Return a list of all the comment positions */
@deprecated("Use `comments` to get rich information source comments", since = "3.3.1")
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