O object

Unlifted

extends Object with Serializable

Value expressions

Supertypes

Object, Serializable

Members

def 

unapply

[T] ( expr: Expr[T] ) ( implicit  unlift: Unliftable[T] qxtc: QuoteContext ) : Option[T]

Matches expressions containing values and extracts the value.

Usage:

Matches expressions containing values and extracts the value.

Usage:

(x: Expr[B]) match {
  case Unlifted(value) => ... // value: B
}
def 

unapply

[T] ( exprs: Seq[Expr[T]] ) ( implicit  unlift: Unliftable[T] qctx: QuoteContext ) : Option[Seq[T]]

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

Usage:

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 QuoteContext): Expr[Int] = argsExpr match
  case Varargs(Unlifted(args)) =>
    // args: Seq[Int]
    ...
}