@@ -21,10 +21,10 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with CoreImpl with Helpers
2121 }
2222
2323 object PackageClause extends PackageClauseModule {
24- def apply (pid : Ref , stats : List [Tree ])(implicit ctx : Context ): PackageClause =
24+ def apply (pid : Term . Ref , stats : List [Tree ])(implicit ctx : Context ): PackageClause =
2525 tpd.PackageDef (pid.asInstanceOf [tpd.RefTree ], stats)
2626
27- def unapply (tree : Tree )(implicit ctx : Context ): Option [(Ref , List [Tree ])] = tree match {
27+ def unapply (tree : Tree )(implicit ctx : Context ): Option [(Term . Ref , List [Tree ])] = tree match {
2828 case x : tpd.PackageDef => Some ((x.pid, x.stats))
2929 case _ => None
3030 }
@@ -34,8 +34,6 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with CoreImpl with Helpers
3434
3535 }
3636
37- // ----- Statements -----------------------------------------------
38-
3937 object Import extends ImportModule {
4038 def apply (expr : Term , selectors : List [ImportSelector ])(implicit ctx : Context ): Import =
4139 tpd.Import (expr, selectors)
@@ -51,6 +49,15 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with CoreImpl with Helpers
5149 def selector (implicit ctx : Context ): List [ImportSelector ] = imp.selectors
5250 }
5351
52+ object IsStatement extends IsStatementModule {
53+ /** Matches any Statement and returns it */
54+ def unapply (tree : Tree )(implicit ctx : Context ): Option [Statement ] = tree match {
55+ case IsDefinition (tree) => Some (tree)
56+ case tree if tree.isTerm => Some (tree)
57+ case _ => None
58+ }
59+ }
60+
5461 // ----- Definitions ----------------------------------------------
5562
5663 object IsDefinition extends IsDefinitionModule {
@@ -737,10 +744,9 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with CoreImpl with Helpers
737744
738745 object SelectOuter extends SelectOuterModule {
739746
740- def apply (call : Option [TermOrTypeTree ], bindings : List [Definition ], expansion : Term )(implicit ctx : Context ): Inlined =
741- tpd.Inlined (call.getOrElse(tpd.EmptyTree ), bindings.map { case b : tpd.MemberDef => b }, expansion)
747+ def apply (qualifier : Term , levels : Int , tpe : Type )(implicit ctx : Context ): SelectOuter = ???
742748
743- def copy (original : Tree )(call : Option [ TermOrTypeTree ], bindings : List [ Definition ], expansion : Term )(implicit ctx : Context ): Inlined = ???
749+ def copy (original : Tree )(qualifier : Term , levels : Int , tpe : Type )(implicit ctx : Context ): SelectOuter = ???
744750
745751 def unapply (x : Term )(implicit ctx : Context ): Option [(Term , Int , Type )] = x match {
746752 case x : tpd.Select =>
0 commit comments