File tree 1 file changed +7
-12
lines changed
scaladoc/src/dotty/tools/scaladoc/tasty
1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,11 @@ import dotty.tools.scaladoc.util.Escape._
6
6
import scala .util .matching .Regex
7
7
8
8
trait Scaladoc2AnchorCreator :
9
- self : SymOps [_] =>
10
9
11
- import self .q .reflect ._
12
-
13
- implicit private val printer : Printer [Tree ] = Printer .TreeShortCode
14
-
15
- def getScaladoc2Type (t : Tree ) = {
16
- (t match {
17
- case d : DefDef => d.show.split(" def" , 2 )(1 )
18
- case t : TypeDef => t.show.split(" type" , 2 )(1 )
19
- case v : ValDef => v.show.split(" val|var" , 2 )(1 )
20
- }).replace(" " ," " )
21
- }
10
+ def getScaladoc2Type (using Quotes )(t : quotes.reflect.Tree ) =
11
+ import quotes .reflect .*
12
+ val spliter = t match
13
+ case d : DefDef => " def"
14
+ case t : TypeDef => " type"
15
+ case v : ValDef => " val|var"
16
+ t.show(using Printer .TreeShortCode ).split(spliter, 2 )(1 ).replace(" " ," " )
You can’t perform that action at this time.
0 commit comments