diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2011-10-12 10:53:23 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2011-10-12 10:53:23 +0000 |
commit | 4f5159f0ed90598d1e5553afcce7ef2d1ff59d51 (patch) | |
tree | 5731b34756f435c763e654ee7ad2f9bed4a4d104 | |
parent | d3f0fa824b2fb12d71fe47187991abd31b47546a (diff) | |
download | scala-4f5159f0ed90598d1e5553afcce7ef2d1ff59d51.tar.gz scala-4f5159f0ed90598d1e5553afcce7ef2d1ff59d51.tar.bz2 scala-4f5159f0ed90598d1e5553afcce7ef2d1ff59d51.zip |
Added back reporting of comment tokens from the...
Added back reporting of comment tokens from the Scanner. This allows the
IDE to show 'TODO' tasks in the Tasks view.
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala index c642af5dd7..ff284dd219 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala @@ -142,6 +142,7 @@ trait Scanners extends ScannersCommon { if (docBuffer ne null) docBuffer.append(c) } + protected def foundComment(value: String, start: Int, end: Int) = () protected def foundDocComment(value: String, start: Int, end: Int) = () private class TokenData0 extends TokenData @@ -486,6 +487,8 @@ trait Scanners extends ScannersCommon { if (buildingDocComment) foundDocComment(comment.toString, offset, charOffset - 2) } + + foundComment(comment.toString, offset, charOffset - 2) true } else { false @@ -1144,6 +1147,11 @@ trait Scanners extends ScannersCommon { } } + override def foundComment(value: String, start: Int, end: Int) { + val pos = new RangePosition(unit.source, start, start, end) + unit.comment(pos, value) + } + override def foundDocComment(value: String, start: Int, end: Int) { docPos = new RangePosition(unit.source, start, start, end) unit.comment(docPos, value) |