@@ -9,19 +9,19 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
99 import tasty ._
1010 import syntaxHighlight ._
1111
12- def showTree (tree : Tree )( using ctx : Context ) : String =
12+ def showTree (tree : Tree ): String =
1313 (new Buffer ).printTree(tree).result()
1414
15- def showType (tpe : Type )( using ctx : Context ) : String =
15+ def showType (tpe : Type ): String =
1616 (new Buffer ).printType(tpe)(using None ).result()
1717
18- def showConstant (const : Constant )( using ctx : Context ) : String =
18+ def showConstant (const : Constant ): String =
1919 (new Buffer ).printConstant(const).result()
2020
21- def showSymbol (symbol : Symbol )( using ctx : Context ) : String =
21+ def showSymbol (symbol : Symbol ): String =
2222 symbol.fullName
2323
24- def showFlags (flags : Flags )( using ctx : Context ) : String = {
24+ def showFlags (flags : Flags ): String = {
2525 val flagList = List .newBuilder[String ]
2626 if (flags.is(Flags .Abstract )) flagList += " abstract"
2727 if (flags.is(Flags .Artifact )) flagList += " artifact"
@@ -60,7 +60,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
6060 flagList.result().mkString(" /*" , " " , " */" )
6161 }
6262
63- private class Buffer ( using ctx : Context ) {
63+ private class Buffer {
6464
6565 private [this ] val sb : StringBuilder = new StringBuilder
6666
@@ -1413,7 +1413,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
14131413 private [this ] val names = collection.mutable.Map .empty[Symbol , String ]
14141414 private [this ] val namesIndex = collection.mutable.Map .empty[String , Int ]
14151415
1416- private def splicedName (sym : Symbol )( using ctx : Context ) : Option [String ] = {
1416+ private def splicedName (sym : Symbol ): Option [String ] = {
14171417 sym.annots.find(_.symbol.owner == Symbol .requiredClass(" scala.internal.quoted.showName" )).flatMap {
14181418 case Apply (_, Literal (Constant (c : String )) :: Nil ) => Some (c)
14191419 case Apply (_, Inlined (_, _, Literal (Constant (c : String ))) :: Nil ) => Some (c)
@@ -1434,7 +1434,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
14341434 }
14351435
14361436 private object SpecialOp {
1437- def unapply (arg : Tree )( using ctx : Context ) : Option [(String , List [Term ])] = arg match {
1437+ def unapply (arg : Tree ): Option [(String , List [Term ])] = arg match {
14381438 case arg @ Apply (fn, args) =>
14391439 fn.tpe match {
14401440 case tpe @ TermRef (ThisType (TypeRef (_, name)), name2) if name == " <special-ops>" =>
@@ -1446,7 +1446,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
14461446 }
14471447
14481448 private object Annotation {
1449- def unapply (arg : Tree )( using ctx : Context ) : Option [(TypeTree , List [Term ])] = arg match {
1449+ def unapply (arg : Tree ): Option [(TypeTree , List [Term ])] = arg match {
14501450 case New (annot) => Some ((annot, Nil ))
14511451 case Apply (Select (New (annot), " <init>" ), args) => Some ((annot, args))
14521452 case Apply (TypeApply (Select (New (annot), " <init>" ), targs), args) => Some ((annot, args))
@@ -1458,7 +1458,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
14581458 private object Types {
14591459
14601460 object Sequence {
1461- def unapply (tpe : Type )( using ctx : Context ) : Option [Type ] = tpe match {
1461+ def unapply (tpe : Type ): Option [Type ] = tpe match {
14621462 case AppliedType (seq, (tp : Type ) :: Nil )
14631463 if seq.typeSymbol == Symbol .requiredClass(" scala.collection.Seq" ) || seq.typeSymbol == Symbol .requiredClass(" scala.collection.immutable.Seq" ) =>
14641464 Some (tp)
@@ -1467,7 +1467,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
14671467 }
14681468
14691469 object Repeated {
1470- def unapply (tpe : Type )( using ctx : Context ) : Option [Type ] = tpe match {
1470+ def unapply (tpe : Type ): Option [Type ] = tpe match {
14711471 case AppliedType (rep, (tp : Type ) :: Nil ) if rep.typeSymbol == Symbol .requiredClass(" scala.<repeated>" ) => Some (tp)
14721472 case _ => None
14731473 }
@@ -1476,7 +1476,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
14761476 }
14771477
14781478 object PackageObject {
1479- def unapply (tree : Tree )( using ctx : Context ) : Option [Tree ] = tree match {
1479+ def unapply (tree : Tree ): Option [Tree ] = tree match {
14801480 case PackageClause (_, ValDef (" package" , _, _) :: body :: Nil ) => Some (body)
14811481 case _ => None
14821482 }
0 commit comments