diff options
-rw-r--r-- | src/attic/scala/tools/nsc/models/SemanticTokens.scala | 11 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 42 |
2 files changed, 0 insertions, 53 deletions
diff --git a/src/attic/scala/tools/nsc/models/SemanticTokens.scala b/src/attic/scala/tools/nsc/models/SemanticTokens.scala index 5b492ba056..ab75bbbcfc 100644 --- a/src/attic/scala/tools/nsc/models/SemanticTokens.scala +++ b/src/attic/scala/tools/nsc/models/SemanticTokens.scala @@ -406,17 +406,6 @@ class SemanticTokens(val compiler: Global) { doLog = false; } }; -/* - Martin to Sean: I don't understand why AbsTypeDef is different from AliasTypeDef. - Why is the order reversed? Why two buildDefs for tree.symbol vs one for AliasTypeDef? - case tree: AbsTypeDef => - //Console.err.println("ABS: " + tree.symbol + " " + unit.source.dbg(tree.namePos) + " " + tree.pos.dbgString); - buildDef(tree.symbol, tree.namePos) - buildDef(tree.symbol, tree.pos.pointOrElse(-1)) - build(tree.tparams); //@M - build(tree.lo) - build(tree.hi) -*/ case tree: Bind => buildDef(tree.symbol, tree.pos.pointOrElse(-1)) build(tree.body) diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index 74d8a29fee..e0a1b13fdf 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -37,17 +37,6 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => "_"+nextexid } -/* - type Position; - def NoPos : Position; - def FirstPos : Position; - implicit def coercePosToInt(pos : Position) : Int; - def coerceIntToPos(pos : Int) : Position; - object RequiresIntsAsPositions { - implicit def coerceIntToPos0(pos: Int) = - coerceIntToPos(pos) - } - */ /** The class for all symbols */ abstract class Symbol(initOwner: Symbol, initPos: Position, initName: Name) extends AbsSymbol { @@ -65,37 +54,6 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => def pos = rawpos def setPos(pos: Position): this.type = { this.rawpos = pos; this } - def namePos(source: BatchSourceFile) = { - val pos: Int = this.pos.pointOrElse(-1) - val buf = source.content - if (pos == -1) -1 - else if (isTypeParameter) pos - name.length - else if (isVariable || isMethod || isClass || isModule) { - var ret = pos - if (buf(pos) == ',') ret += 1 - else if (isClass) ret += "class".length() - else if (isModule) ret += "object".length() - else ret += "var".length() - while (buf(ret).isWhitespace) ret += 1 - ret - } - else if (isValue) { - if (pos < (buf.length + ("val ").length())) { - if ((buf(pos + 0) == 'v') && - (buf(pos + 1) == 'a') && - (buf(pos + 2) == 'l') && - (buf(pos + 3) == ' ')) { - var pos0 = pos + 4 - while (pos0 < buf.length && buf(pos0).isWhitespace) - pos0 += 1 - pos0 - - } else pos - } else pos - } - else -1 - } - // annotations private var rawannots: List[AnnotationInfoBase] = Nil |