C class

Expr [+T]

extends Object

Quoted expression of type T

Supertypes

Object

Constructors

Expr

( )

Members

final def 

getValue

[U] ( implicit  qctx: QuoteContext valueOf: ValueOfExpr[U] ) : Option[U]

Return the value of this expression.

Returns None if the expression does not contain a value or contains side effects. Otherwise returns the Some of the...

Return the value of this expression.

Returns None if the expression does not contain a value or contains side effects. Otherwise returns the Some of the value.

final def 

matches

( that: Expr[Any] ) ( implicit  qctx: QuoteContext ) : Boolean

Pattern matches this against that. Effectively performing a deep equality check. It does the equivalent of

Pattern matches this against that. Effectively performing a deep equality check. It does the equivalent of

this match
  case '{...} => true // where the contens of the pattern are the contents of `that`
  case _ => false
def 

show

( implicit  qctx: QuoteContext ) : String

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

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

def 

show

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

Show a source code like representation of this expression

Show a source code like representation of this expression

def 

underlyingArgument

( implicit  qctx: QuoteContext ) : Expr[T]

Returns the undelying argument that was in the call before inlining.

Returns the undelying argument that was in the call before inlining.

inline foo(x: Int): Int = baz(x, x)
foo(bar())

is inlined as

val x = bar()
baz(x, x)

in this case the undelying argument of x will be bar().

Warning: Using the undelying argument directly in the expansion of a macro may change the parameter semantics from by-value to by-name.