ValDefModule

Methods of the module object val ValDef

Source
Quotes.scala
class Object
trait Matchable
class Any

Value members

Abstract methods

def apply(symbol: Symbol, rhs: Option[Term]): ValDef

Create a value definition val x, var x or lazy val x with the signature defined in the symbol.

Create a value definition val x, var x or lazy val x with the signature defined in the symbol.

The rhs should return be Some containing the implementation of the method. Returns None the method has no implementation. Any definition directly inside the implementation should have symbol as owner.

See also: Tree.changeOwner

Source
Quotes.scala
def copy(original: Tree)(name: String, tpt: TypeTree, rhs: Option[Term]): ValDef
def let(owner: Symbol, name: String, rhs: Term)(body: Ref => Term): Term

Creates a block { val = ; }

Creates a block { val = ; }

Source
Quotes.scala
def let(owner: Symbol, terms: List[Term])(body: List[Ref] => Term): Term

Creates a block { val x1 = ; ...; val xn = ; }

Creates a block { val x1 = ; ...; val xn = ; }

Source
Quotes.scala

Concrete methods

def let(owner: Symbol, rhs: Term)(body: Ref => Term): Term

Creates a block { val x = ; }

Creates a block { val x = ; }

Source
Quotes.scala