File tree 4 files changed +9
-8
lines changed
scaladoc/src/dotty/tools/scaladoc
4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,12 @@ package dotty.tools.scaladoc
2
2
package snippets
3
3
4
4
import scala .quoted ._
5
- import dotty .tools .scaladoc .tasty .SymOps
5
+ import dotty .tools .scaladoc .tasty .SymOps . _
6
6
import dotty .tools .dotc .core ._
7
7
8
8
class SnippetCompilerDataCollector [Q <: Quotes ](val qctx : Q ):
9
9
import qctx .reflect ._
10
- object SymOps extends SymOps [qctx.type ](qctx)
11
- export SymOps ._
10
+ given qctx .type = qctx
12
11
13
12
def getSnippetCompilerData (sym : Symbol , originalSym : Symbol ): SnippetCompilerData =
14
13
val packageName = sym.packageName
Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ trait BasicSupport:
39
39
extension (using Quotes )(sym : reflect.Symbol )
40
40
def documentation = sym.docstring.map(parseComment(_, sym.tree))
41
41
42
- def source =
43
- val path = sym.pos.map(_.sourceFile.jpath).filter(_ != null ).map(_.toAbsolutePath)
44
- path.map(TastyMemberSource (_, sym.pos.get.startLine))
45
-
46
42
def getAnnotations (): List [Annotation ] =
47
43
sym.annotations.filterNot(_.symbol.packageName.startsWith(" scala.annotation.internal" )).map(parseAnnotation).reverse
48
44
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ object SymOps:
38
38
Some (s " ${sym.name}- $hash" )
39
39
}
40
40
else None
41
+
42
+ def source =
43
+ val path = sym.pos.map(_.sourceFile.jpath).filter(_ != null ).map(_.toAbsolutePath)
44
+ path.map(TastyMemberSource (_, sym.pos.get.startLine))
45
+
41
46
// TODO: Retrieve string that will match scaladoc anchors
42
47
43
48
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import scala.quoted._
13
13
import dotty .tools .scaladoc .tasty .comments .markdown .ExtendedFencedCodeBlock
14
14
import dotty .tools .scaladoc .tasty .comments .wiki .Paragraph
15
15
import dotty .tools .scaladoc .DocPart
16
- import dotty .tools .scaladoc .tasty .SymOpsWithLinkCache
16
+ import dotty .tools .scaladoc .tasty .{ SymOpsWithLinkCache , SymOps }
17
17
import collection .JavaConverters ._
18
18
import dotty .tools .scaladoc .snippets ._
19
19
@@ -89,6 +89,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
89
89
90
90
object SymOpsWithLinkCache extends SymOpsWithLinkCache
91
91
export SymOpsWithLinkCache ._
92
+ import SymOps ._
92
93
93
94
def resolveLink (queryStr : String ): DocLink =
94
95
if SchemeUri .matches(queryStr) then DocLink .ToURL (queryStr)
You can’t perform that action at this time.
0 commit comments