Skip to content

Commit fa0793b

Browse files
committed
Split the defintion of tasty reflect
1 parent 2862af6 commit fa0793b

17 files changed

+1025
-889
lines changed

compiler/src/dotty/tools/dotc/tastyreflect/FlagSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dotty.tools.dotc.tastyreflect
33
import dotty.tools.dotc.core.Flags
44
import dotty.tools.dotc.core.Flags._
55

6-
class FlagSet(flags: Flags.FlagSet) extends scala.tasty.FlagSet {
6+
class FlagSet(flags: Flags.FlagSet) extends scala.tasty.reflect.FlagSet {
77

88
def isProtected: Boolean = flags.is(Protected)
99
def isAbstract: Boolean = flags.is(Abstract)

compiler/src/dotty/tools/dotc/tastyreflect/TastyImpl.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class TastyImpl(val rootContext: Contexts.Context) extends scala.tasty.Tasty { s
2828

2929
// ===== Show =====================================================
3030

31-
def defaultShow: Show[this.type] = showExtractors
32-
3331
def showExtractors: Show[this.type] = new ShowExtractors(this)
3432

3533
def showSourceCode: Show[this.type] = new ShowSourceCode(this)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package scala.tasty
2+
3+
/** Extension methods on scala.quoted.{Expr|Type} to convert to scala.tasty.Tasty objects */
4+
trait QuotedOps { tasty: Tasty =>
5+
6+
trait QuotedExprAPI {
7+
def toTasty(implicit ctx: Context): Term
8+
}
9+
implicit def QuotedExprDeco[T](expr: quoted.Expr[T]): QuotedExprAPI
10+
11+
trait QuotedTypeAPI {
12+
def toTasty(implicit ctx: Context): TypeTree
13+
}
14+
implicit def QuotedTypeDeco[T](tpe: quoted.Type[T]): QuotedTypeAPI
15+
16+
}

0 commit comments

Comments
 (0)