I learned how to splice expr in quotes now. But I didn't find how to splice multiple exprs in a quote. I have a selectable trait and a macro impl function:
trait StructuralTypeRoot extends Selectable
def macroImpl(using q: Quotes): Expr[Any] = {
val exprs: Vector[Expr[Any]] = Vector(
'{def f = 1},
'{def g = 2}) /*make some method def exprs here*/
'{
new StructuralTypeRoot{
${exprs} // can't do this. How can i splice exprs here
}
}
}