
io.getquill.quotation.Bindings.scala Maven / Gradle / Ivy
package io.getquill.quotation
import scala.reflect.macros.whitebox.Context
object Bindings {
def apply(c: Context)(quoted: c.Tree, tpe: c.Type): Map[c.Symbol, c.Tree] = {
import c.universe._
tpe
.member(TermName("bindings"))
.typeSignature.decls.collect {
case m: MethodSymbol if (m.isGetter) =>
m ->
q"""
{
import language.reflectiveCalls
$quoted.bindings.$m
}
"""
}.toMap
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy