File tree Expand file tree Collapse file tree 12 files changed +24
-0
lines changed
compiler/src/dotty/tools/dotc/tasty/internal Expand file tree Collapse file tree 12 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import scala.tasty.types
8
8
9
9
object MethodType {
10
10
11
+ // TODO make sure all extractors are tested
12
+
11
13
def apply (tpe : Types .MethodType )(implicit ctx : Context ): types.MethodType = Impl (tpe, ctx)
12
14
13
15
def unapplyMethodType (tpe : types.MaybeType ): Option [types.MethodType .Data ] = tpe match {
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import scala.tasty.modifiers
9
9
10
10
object Modifier {
11
11
12
+ // TODO make sure all flags are tested
13
+
12
14
def apply (mod : untpd.Mod )(implicit ctx : Context ): modifiers.Modifier = Impl (mod, ctx)
13
15
14
16
private case class Impl (mod : untpd.Mod , ctx : Context ) extends modifiers.Modifier {
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import scala.tasty.statements
8
8
9
9
object Package {
10
10
11
+ // TODO make sure all extractors are tested
12
+
11
13
def apply (tree : tpd.Tree )(implicit ctx : Context ): statements.Package = Impl (tree, ctx)
12
14
13
15
def unapplyPackage (term : scala.tasty.statements.TopLevelStatement ): Option [statements.Package .Data ] = term match {
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import scala.tasty.types
8
8
9
9
object PolyType {
10
10
11
+ // TODO make sure all extractors are tested
12
+
11
13
def apply (tpe : Types .PolyType )(implicit ctx : Context ): types.PolyType = Impl (tpe, ctx)
12
14
13
15
def unapplyPolyType (tpe : types.MaybeType ): Option [types.PolyType .Data ] = tpe match {
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import scala.tasty.modifiers
9
9
10
10
object QualifiedModifier {
11
11
12
+ // TODO make sure all extractors are tested
13
+
12
14
def apply (tree : tpd.DefTree )(implicit ctx : Context ): modifiers.Modifier = Impl (tree, ctx)
13
15
14
16
def unapplyQualifiedPrivate (mod : modifiers.Modifier ): Option [modifiers.QualifiedPrivate .Data ] = mod match {
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import scala.tasty.types
8
8
9
9
object RecursiveType {
10
10
11
+ // TODO make sure all extractors are tested
12
+
11
13
def apply (bounds : Types .RecType )(implicit ctx : Context ): types.RecursiveType = Impl (bounds, ctx)
12
14
13
15
def unapplyRecursiveType (tpe : types.MaybeType ): Option [types.RecursiveType .Data ] = tpe match {
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import scala.tasty.names
7
7
8
8
object SignedName {
9
9
10
+ // TODO make sure all extractors are tested
11
+
10
12
def apply (name : Names .TermName ): names.SignedName = Impl (name)
11
13
12
14
def unapplySignedName (arg : names.PossiblySignedName ): Option [names.SignedName .Data ] = arg match {
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import scala.tasty.types
13
13
14
14
object Term {
15
15
16
+ // TODO make sure all extractors are tested
17
+
16
18
def apply (arg : tpd.Tree )(implicit ctx : Context ): terms.Term = Impl (arg, ctx)
17
19
18
20
def unapplyIdent (arg : statements.TopLevelStatement ): Option [terms.Ident .Data ] = arg match {
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import scala.tasty.names
8
8
9
9
object TermName {
10
10
11
+ // TODO make sure all extractors are tested
12
+
11
13
def apply (name : Names .TermName ): names.TermName = Impl (name)
12
14
13
15
def unapplySimple (arg : names.Name ): Option [names.Simple .Data ] = arg match {
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import scala.tasty.types
8
8
9
9
object TypeBounds {
10
10
11
+ // TODO make sure all extractors are tested
12
+
11
13
def apply (bounds : Types .TypeBounds )(implicit ctx : Context ): types.TypeBounds = Impl (bounds, ctx)
12
14
13
15
def unapplyTypeBounds (tpe : types.MaybeType ): Option [types.TypeBounds .Data ] = tpe match {
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import scala.tasty.types
8
8
9
9
object TypeLambda {
10
10
11
+ // TODO make sure all extractors are tested
12
+
11
13
def apply (tpe : Types .TypeLambda )(implicit ctx : Context ): types.TypeLambda = Impl (tpe, ctx)
12
14
13
15
def unapplyTypeLambda (tpe : types.MaybeType ): Option [types.TypeLambda .Data ] = tpe match {
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import scala.tasty.names
6
6
7
7
object TypeName {
8
8
9
+ // TODO make sure all extractors are tested
10
+
9
11
def apply (name : Names .TypeName ): names.TypeName = Impl (name)
10
12
11
13
def unapplyTypeName (arg : names.Name ): Option [names.TypeName .Data ] = arg match {
You can’t perform that action at this time.
0 commit comments