TreeMethods

scala.quoted.Quotes.reflectModule.TreeMethods
trait TreeMethods

Extension methods of Tree

Attributes

Source
Quotes.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Extensions

Extensions

extension (self: Quotes.this.reflectModule.this.Tree)
def asExpr: Expr[Any]

Convert this tree to an quoted.Expr[Any] if the tree is a valid expression or throws

Convert this tree to an quoted.Expr[Any] if the tree is a valid expression or throws

Attributes

Source
Quotes.scala

Does this tree represent a valid expression?

Does this tree represent a valid expression?

Attributes

Source
Quotes.scala
def pos: Quotes.this.reflectModule.this.Position

Position in the source code

Position in the source code

Attributes

Source
Quotes.scala
def show(using Quotes.this.reflectModule.this.Printer[Quotes.this.reflectModule.this.Tree]): String

Shows the tree as String

Shows the tree as String

Attributes

Source
Quotes.scala

Symbol of defined or referred by this tree

Symbol of defined or referred by this tree

Attributes

Source
Quotes.scala
extension (self: Quotes.this.reflectModule.this.Tree)
def asExprOf[T](using Type[T]): Expr[T]

Convert this tree to an quoted.Expr[T] if the tree is a valid expression or throws

Convert this tree to an quoted.Expr[T] if the tree is a valid expression or throws

Attributes

Source
Quotes.scala
extension [ThisTree <: Quotes.this.reflectModule.this.Tree](self: ThisTree)
def changeOwner(newOwner: Quotes.this.reflectModule.this.Symbol): ThisTree

Changes the owner of the symbols in the tree

Changes the owner of the symbols in the tree

Attributes

Source
Quotes.scala