Skip to content

Commit

Permalink
TreeOps: define the Args component of CallParts
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Jan 13, 2022
1 parent 4082bbd commit a0f8da9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ class FormatOps(

private def getOpenNLByTree(
fun: Tree,
argsOrArgss: Either[Seq[Tree], Seq[Seq[Tree]]],
argsOrArgss: CallArgs,
penalty: Int
): Seq[Policy] = {
val argss = argsOrArgss match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ object TreeOps {
case _ => false
}

type CallParts = (Tree, Either[Seq[Tree], Seq[Seq[Tree]]])
type CallArgs = Either[Seq[Tree], Seq[Seq[Tree]]]
type CallParts = (Tree, CallArgs)
val splitCallIntoParts: PartialFunction[Tree, CallParts] = {
case t: Term.Apply => (t.fun, Left(t.args))
case t: Term.Super => (t, Left(Seq(t.superp)))
Expand Down

0 comments on commit a0f8da9

Please sign in to comment.