diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala index 7897421bd7..9617b15068 100644 --- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala @@ -28,10 +28,10 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory with Member protected val commentCache = mutable.HashMap.empty[(global.Symbol, TemplateImpl), Comment] - // def addCommentBody(sym: global.Symbol, inTpl: TemplateImpl, docStr: String, docPos: global.Position): global.Symbol = { - // commentCache += (sym, inTpl) -> parse(docStr, docStr, docPos, None) - // sym - // } + def addCommentBody(sym: global.Symbol, inTpl: TemplateImpl, docStr: String, docPos: global.Position): global.Symbol = { + commentCache += (sym, inTpl) -> parse(docStr, docStr, docPos, None) + sym + } def comment(sym: global.Symbol, currentTpl: Option[DocTemplateImpl], inTpl: DocTemplateImpl): Option[Comment] = { val key = (sym, inTpl) @@ -132,7 +132,7 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory with Member val note = note0 val example = example0 val constructor = constructor0 - // val source = source0 + val source = source0 val inheritDiagram = inheritDiagram0 val contentDiagram = contentDiagram0 val groupDesc = groupDesc0 @@ -957,19 +957,19 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory with Member count } - // final def jumpUntil(chars: String): Int = { - // assert(chars.length > 0) - // var count = 0 - // val c = chars.charAt(0) - // while (!check(chars) && char != endOfText) { - // nextChar() - // while (char != c && char != endOfText) { - // nextChar() - // count += 1 - // } - // } - // count - // } + final def jumpUntil(chars: String): Int = { + assert(chars.length > 0) + var count = 0 + val c = chars.charAt(0) + while (!check(chars) && char != endOfText) { + nextChar() + while (char != c && char != endOfText) { + nextChar() + count += 1 + } + } + count + } final def jumpUntil(pred: => Boolean): Int = { var count = 0 |