@@ -10,13 +10,13 @@ import ScaladocSupport._
10
10
11
11
trait BasicSupport :
12
12
self : TastyParser =>
13
- import qctx . reflect . _
13
+
14
14
object SymOpsWithLinkCache extends SymOpsWithLinkCache
15
15
export SymOpsWithLinkCache ._
16
16
17
- private given qctx .type = qctx
18
17
19
- def parseAnnotation (annotTerm : Term ): Annotation =
18
+ def parseAnnotation (using Quotes )(annotTerm : quotes.reflect.Term ): Annotation =
19
+ import quotes .reflect ._
20
20
import dotty .tools .dotc .ast .Trees .{SeqLiteral }
21
21
val dri = annotTerm.tpe.typeSymbol.dri
22
22
def inner (t : Term ): List [Annotation .AnnotationParameter ] = t match {
@@ -29,18 +29,17 @@ trait BasicSupport:
29
29
case other => List (Annotation .UnresolvedParameter (None , other.show))
30
30
}
31
31
32
-
33
32
val params = annotTerm match
34
33
case Apply (target, appliedWith) => {
35
34
appliedWith.flatMap(inner)
36
35
}
37
36
38
37
Annotation (dri, params)
39
38
40
- extension (sym : Symbol )
39
+ extension (using Quotes )( sym : quotes.reflect. Symbol )
41
40
def documentation = sym.docstring.map(parseComment(_, sym.tree))
42
41
43
- def source ( using Quotes ) =
42
+ def source =
44
43
val path = sym.pos.map(_.sourceFile.jpath).filter(_ != null ).map(_.toAbsolutePath)
45
44
path.map(TastyMemberSource (_, sym.pos.get.startLine))
46
45
@@ -54,5 +53,4 @@ trait BasicSupport:
54
53
}.map(parseAnnotation)
55
54
56
55
def isLeftAssoc : Boolean = ! sym.name.endsWith(" :" )
57
-
58
-
56
+ end extension
0 commit comments