scala.quoted.staging

Type members

Classlikes

@implicitNotFound("Could not find implicit scala.quoted.staging.Compiler.\n\nDefault compiler can be instantiated with:\n `import scala.quoted.staging.Compiler; given Compiler = Compiler.make(getClass.getClassLoader)`\n\n")
trait Compiler
Companion
object
object Compiler
Companion
class

Value members

Concrete methods

def run[T](expr: Quotes => Expr[T])(using compiler: Compiler): T

Evaluate the contents of this expression and return the result. It provides a new Quotes that is only valid within the scope the argument.

Evaluate the contents of this expression and return the result. It provides a new Quotes that is only valid within the scope the argument.

Usage:

val e: T = run { // (quotes: Quotes) ?=>
  expr
}

where expr: Expr[T]

This method should not be called in a context where there is already has a Quotes such as within a run or a withQuotes.

def withQuotes[T](thunk: Quotes => T)(using compiler: Compiler): T

Provide a new quote context within the scope of the argument that is only valid within the scope the argument. Return the result of the argument.

Provide a new quote context within the scope of the argument that is only valid within the scope the argument. Return the result of the argument.

Usage:

val e: T = withQuotes { // (quotes: Quotes) ?=>
  thunk
}

where thunk: T

This method should not be called in a context where there is already has a Quotes such as within a run or a withQuotes.