How do I extract primary constructor params with a quasiquote

158 Views Asked by At

I'm currently using:

annottees map (_.tree) match {
  case (classDef @ q"$mods class $tpname[..$tparams] $ctorMods(...$paramss) extends { ..$earlydefns } with ..$parents { $self => ..$stats }")
  :: Nil =>

to extract both the classDef and the paramss. Is there anyway that this could be less verbose? Perhaps something that extracts paramss from pattern matching a classDef: ClassDef?

0

There are 0 best solutions below