Skip to content

Commit

Permalink
Remove unused comment property of UseCases
Browse files Browse the repository at this point in the history
  • Loading branch information
Duhemm committed Sep 4, 2018
1 parent 0c555cc commit 79ffffd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions compiler/src/dotty/tools/dotc/core/Comments.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,8 @@ object Comments {
val codeEnd = skipToEol(raw, codeStart)
val code = raw.substring(codeStart, codeEnd) + " = ???"
val codePos = subPos(codeStart, codeEnd)
val commentStart = skipLineLead(raw, codeEnd + 1) min end
val commentStr = "/** " + raw.substring(commentStart, end) + "*/"
val commentPos = subPos(commentStart, end)

UseCase(Comment(commentPos, commentStr), code, codePos)
UseCase(code, codePos)
}
}

Expand All @@ -106,16 +103,16 @@ object Comments {
}
}

abstract case class UseCase(comment: Comment, code: String, codePos: Position) {
abstract case class UseCase(code: String, codePos: Position) {
/** Set by typer */
var tpdCode: tpd.DefDef = _

def untpdCode: untpd.Tree
}

object UseCase {
def apply(comment: Comment, code: String, codePos: Position)(implicit ctx: Context) =
new UseCase(comment, code, codePos) {
def apply(code: String, codePos: Position)(implicit ctx: Context) =
new UseCase(code, codePos) {
val untpdCode = {
val tree = new Parser(new SourceFile("<usecase>", code)).localDef(codePos.start)

Expand Down

0 comments on commit 79ffffd

Please sign in to comment.