当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Scala reflectModule.TreeAccumulator用法及代码示例


用法:

trait TreeAccumulator[X]

可定制的树累加器。

用法:

package scala.quoted
trait Snippet0 { self: runtime.QuoteUnpickler & scala.quoted.runtime.QuoteMatching &    scala.quoted.Quotes =>
  val QuoteUnpickler = self
  val QuoteMatching = self
  val Quotes = self
  trait Snippet1 { self: Quotes.reflect.type /*Quotes.reflectModule*/ &    Quotes.reflectModule =>
    val reflect = self
    val reflectModule = self
    trait Snippet2[X] { self: reflectModule.TreeAccumulator[X] =>
      val TreeAccumulator = self
      class MyTreeAccumulator[X] extends TreeAccumulator[X] {
        def foldTree(x: X, tree: Tree)(owner: Symbol): X = ???
      }
    }
  }
}

源码:

Quotes.scala

相关用法


注:本文由纯净天空筛选整理自scala-lang.org大神的英文原创作品 reflectModule.TreeAccumulator。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。