C class

QuoteContext

extends Object

Quotation context provided by a macro expansion or in the scope of scala.quoted.run. Used to perform all operations on quoted Expr or Type.

It contains the low-level Typed AST API tasty meta-programming API. This API does not have the static type guarantiees that Expr and Type provide.

Supertypes

Object

Constructors

QuoteContext

( tasty: Reflection )

QuoteContext

( )

Members

type 

NestedContext

 = QuoteContext

Type of a QuoteContext profided by a splice within a quote that took this context. It is only required if working with the reflection API.

Usually it is...

Type of a QuoteContext profided by a splice within a quote that took this context. It is only required if working with the reflection API.

Usually it is infered by the quotes an splices typing. But sometimes it is necessary to explicitly state that a context is nested as in the following example:

def run(using qctx: QuoteContext)(tree: qctx.tasty.Tree): Unit =
  def nested()(using qctx.NestedContext): Expr[Int] = '{  ${ makeExpr(tree) } + 1  }
  '{  ${ nested() } + 2 }
def makeExpr(using qctx: QuoteContext)(tree: qctx.tasty.Tree): Expr[Int] = ???
val 

tasty

: Reflection

def 

clone

( ) : Object

def 

eq

( x$0: Object ) : Boolean

def 

error

( msg: => String ) : Unit

Report an error at the position of the macro expansion

Report an error at the position of the macro expansion

def 

error

( msg: => String expr: Expr[Any] ) : Unit

Report an error at the on the position of expr

Report an error at the on the position of expr

def 

finalize

( ) : Unit

def 

ne

( x$0: Object ) : Boolean

def 

notify

( ) : Unit

def 

notifyAll

( ) : Unit

def 

show

( syntaxHighlight: SyntaxHighlight ) ( implicit  qctx: QuoteContext ) : String

Show a source code like representation of this type

Show a source code like representation of this type

def 

show

( implicit  qctx: QuoteContext ) : String

Show a source code like representation of this type without syntax highlight

Show a source code like representation of this type without syntax highlight

def 

synchronized

[X0] ( x$0: X0 ) : X0

def 

throwError

( msg: => String ) : Nothing

Report an error at the position of the macro expansion and throws a StopQuotedContext

Report an error at the position of the macro expansion and throws a StopQuotedContext

def 

throwError

( msg: => String expr: Expr[Any] ) : Nothing

Report an error at the on the position of expr and throws a StopQuotedContext

Report an error at the on the position of expr and throws a StopQuotedContext

def 

unseal

( implicit  qctx: QuoteContext ) : TypeTree

View this expression quoted.Type[T] as a TypeTree

View this expression quoted.Type[T] as a TypeTree

def 

wait

( x$0: Long ) : Unit

def 

wait

( ) : Unit

def 

wait

( x$0: Long x$1: Int ) : Unit

def 

warning

( msg: => String ) : Unit

Report a warning

Report a warning

def 

warning

( msg: => String expr: Expr[Nothing <: Any] ) : Unit

Report a warning at the on the position of expr

Report a warning at the on the position of expr