aboutsummaryrefslogblamecommitdiff
path: root/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/util/Traversing.scala
blob: 1aa07dec1352ab8b1066e1c8f12b8249b25e6f52 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                        
package dotty.tools.dottydoc
package util

object Traversing {
  import model.Entities._

  def mutateEntities(e: Entity)(trans: Entity => Unit): Unit = e match {
    case e: Entity with Members =>
      trans(e)
      e.members.map(mutateEntities(_)(trans))
    case e: Entity => trans(e)
  }
}