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._
5
5
import dotty .tools .scaladoc .{Signature => DSignature }
6
6
7
7
import SymOps ._
8
+ import NameNormalizer ._
8
9
9
10
trait ClassLikeSupport :
10
11
self : TastyParser =>
Original file line number Diff line number Diff line change @@ -4,14 +4,13 @@ import dotty.tools.scaladoc._
4
4
import dotty .tools .dotc .core .StdNames .nme .keywords
5
5
import dotty .tools .dotc .core .Names .termName
6
6
7
+ import scala .quoted ._
7
8
import SymOps ._
8
9
9
- trait NameNormalizer { self : TastyParser =>
10
- import qctx .reflect ._
10
+ object NameNormalizer {
11
11
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 .*
15
14
val withoutGivenPrefix = if s.isGiven then s.name.stripPrefix(" given_" ) else s.name
16
15
val withoutObjectSuffix = if s.flags.is(Flags .Module ) then withoutGivenPrefix.stripSuffix(" $" ) else withoutGivenPrefix
17
16
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(
177
177
isSkipped : qctx.reflect.Symbol => Boolean
178
178
)(
179
179
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 :
181
181
import qctx .reflect ._
182
182
183
183
private given qctx .type = qctx
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package tasty
3
3
4
4
import collection .JavaConverters ._
5
5
6
+ import NameNormalizer ._
7
+
6
8
trait TypesSupport :
7
9
self : TastyParser =>
8
10
import qctx .reflect ._
You can’t perform that action at this time.
0 commit comments