File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
scaladoc/src/dotty/tools/scaladoc/tasty Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import dotty.tools.scaladoc._
55import dotty .tools .scaladoc .{Signature => DSignature }
66
77import SymOps ._
8+ import NameNormalizer ._
89
910trait ClassLikeSupport :
1011 self : TastyParser =>
Original file line number Diff line number Diff line change @@ -4,14 +4,13 @@ import dotty.tools.scaladoc._
44import dotty .tools .dotc .core .StdNames .nme .keywords
55import dotty .tools .dotc .core .Names .termName
66
7+ import scala .quoted ._
78import SymOps ._
89
9- trait NameNormalizer { self : TastyParser =>
10- import qctx .reflect ._
10+ object NameNormalizer {
1111
12- private given qctx .type = qctx
13-
14- extension (s : Symbol ) def normalizedName : String = {
12+ extension (using Quotes )(s : quotes.reflect.Symbol ) def normalizedName : String = {
13+ import quotes .reflect .*
1514 val withoutGivenPrefix = if s.isGiven then s.name.stripPrefix(" given_" ) else s.name
1615 val withoutObjectSuffix = if s.flags.is(Flags .Module ) then withoutGivenPrefix.stripSuffix(" $" ) else withoutGivenPrefix
1716 val constructorNormalizedName = if s.isClassConstructor then " this" else withoutObjectSuffix
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ case class TastyParser(
177177 isSkipped : qctx.reflect.Symbol => Boolean
178178)(
179179 using val ctx : DocContext
180- ) extends ScaladocSupport with BasicSupport with TypesSupport with ClassLikeSupport with SyntheticsSupport with PackageSupport with NameNormalizer :
180+ ) extends ScaladocSupport with BasicSupport with TypesSupport with ClassLikeSupport with SyntheticsSupport with PackageSupport :
181181 import qctx .reflect ._
182182
183183 private given qctx .type = qctx
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package tasty
33
44import collection .JavaConverters ._
55
6+ import NameNormalizer ._
7+
68trait TypesSupport :
79 self : TastyParser =>
810 import qctx .reflect ._
You can’t perform that action at this time.
0 commit comments