File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
scaladoc/src/dotty/tools/scaladoc Expand file tree Collapse file tree 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
22package snippets
33
44import scala .quoted ._
5- import dotty .tools .scaladoc .tasty .SymOps
5+ import dotty .tools .scaladoc .tasty .SymOps . _
66import dotty .tools .dotc .core ._
77
88class SnippetCompilerDataCollector [Q <: Quotes ](val qctx : Q ):
99 import qctx .reflect ._
10- object SymOps extends SymOps [qctx.type ](qctx)
11- export SymOps ._
10+ given qctx .type = qctx
1211
1312 def getSnippetCompilerData (sym : Symbol , originalSym : Symbol ): SnippetCompilerData =
1413 val packageName = sym.packageName
Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ trait BasicSupport:
3939 extension (using Quotes )(sym : reflect.Symbol )
4040 def documentation = sym.docstring.map(parseComment(_, sym.tree))
4141
42- def source =
43- val path = sym.pos.map(_.sourceFile.jpath).filter(_ != null ).map(_.toAbsolutePath)
44- path.map(TastyMemberSource (_, sym.pos.get.startLine))
45-
4642 def getAnnotations (): List [Annotation ] =
4743 sym.annotations.filterNot(_.symbol.packageName.startsWith(" scala.annotation.internal" )).map(parseAnnotation).reverse
4844
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ object SymOps:
3838 Some (s " ${sym.name}- $hash" )
3939 }
4040 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+
4146 // TODO: Retrieve string that will match scaladoc anchors
4247
4348
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import scala.quoted._
1313import dotty .tools .scaladoc .tasty .comments .markdown .ExtendedFencedCodeBlock
1414import dotty .tools .scaladoc .tasty .comments .wiki .Paragraph
1515import dotty .tools .scaladoc .DocPart
16- import dotty .tools .scaladoc .tasty .SymOpsWithLinkCache
16+ import dotty .tools .scaladoc .tasty .{ SymOpsWithLinkCache , SymOps }
1717import collection .JavaConverters ._
1818import dotty .tools .scaladoc .snippets ._
1919
@@ -89,6 +89,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
8989
9090 object SymOpsWithLinkCache extends SymOpsWithLinkCache
9191 export SymOpsWithLinkCache ._
92+ import SymOps ._
9293
9394 def resolveLink (queryStr : String ): DocLink =
9495 if SchemeUri .matches(queryStr) then DocLink .ToURL (queryStr)
You can’t perform that action at this time.
0 commit comments