Skip to content

Commit

Permalink
Scalameta: update to v4.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Dec 22, 2022
1 parent 471b3cf commit 0f24471
Show file tree
Hide file tree
Showing 15 changed files with 488 additions and 511 deletions.
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._

object Dependencies {
val metaconfigV = "0.11.1"
val scalametaV = "4.6.0"
val scalametaV = "4.7.1"
val scalacheckV = "1.17.0"
val coursier = "1.0.3"
val munitV = "0.7.29"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ object AlignToken {
class Matcher(val owner: Option[jurPattern], val parents: Seq[jurPattern]) {
def matches(tree: meta.Tree): Boolean =
owner.forall(check(tree)) &&
(parents.isEmpty || tree.parent.exists(x => parents.forall(check(x))))
(parents.isEmpty || tree.parent.exists { p =>
parents.forall(check(p)) || (p match {
case _: meta.Member.SyntaxValuesClause =>
p.parent.exists { pp => parents.forall(check(pp)) }
case _ => false
})
})
}

@inline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ case class Indents(

def getDefnSite(tree: meta.Tree): Int =
(tree match {
case _: meta.Member.ParamClause | _: meta.Member.ParamClauseGroup =>
tree.parent.map(getDefnSite)
case _: meta.Ctor => ctorSite
case _ => None
}).getOrElse(defnSite)
Expand Down
Loading

0 comments on commit 0f24471

Please sign in to comment.