Exprs

object Exprs
class Object
trait Matchable
class Any
Exprs.type

Value members

Concrete methods

def unapply[T](exprs: Seq[Expr[T]])(using FromExpr[T])(using Quotes): Option[Seq[T]]

Matches literal sequence of literal constant value expressions and return a sequence of values.

Matches literal sequence of literal constant value expressions and return a sequence of values.

Usage:

inline def sum(args: Int*): Int = ${ sumExpr('args) }
def sumExpr(argsExpr: Expr[Seq[Int]])(using Quotes): Expr[Int] = argsExpr match
  case Varargs(Exprs(args)) =>
  case Varargs(Exprs(args)) =>
    // args: Seq[Int]
    ...
}

To directly get the value of all expressions in a sequence exprs: Seq[Expr[T]] consider using exprs.map(_.value)/exprs.map(_.valueOrError) instead.

Source:
Exprs.scala