QuotesAndSplices

dotty.tools.dotc.typer.QuotesAndSplices

Type quotes '{ ... } and splices ${ ... }

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Typer
class ReTyper
class Typer
class Checker
Self type

Members list

Concise view

Value members

Concrete methods

def typedAppliedSplice(tree: Apply, pt: Type)(using Context): Tree

Types a splice applied to some arguments $f(arg1, ..., argn) in a quote pattern.

Types a splice applied to some arguments $f(arg1, ..., argn) in a quote pattern.

The tree is desugared into $f.apply(arg1, ..., argn) where the expression $f is expected to type as a function type (T1, ..., Tn) => R. Ti is the type of the argument argi and R if the type of the prototype. The prototype must be fully defined to be able to infer the type of R.

Attributes

def typedHole(tree: Hole, pt: Type)(using Context): Tree
def typedQuote(tree: Quote, pt: Type)(using Context): Tree

Translate '{ e } into scala.quoted.Expr.apply(e) and '[T] into scala.quoted.Type.apply[T] while tracking the quotation level in the context.

Translate '{ e } into scala.quoted.Expr.apply(e) and '[T] into scala.quoted.Type.apply[T] while tracking the quotation level in the context.

Attributes

def typedQuotedTypeVar(tree: Ident, pt: Type)(using Context): Tree

Type a pattern variable name t in quote pattern as ${given t$giveni: Type[t @ _]}. The resulting pattern is the split in splitQuotePattern.

Type a pattern variable name t in quote pattern as ${given t$giveni: Type[t @ _]}. The resulting pattern is the split in splitQuotePattern.

Attributes

def typedSplice(tree: Splice, pt: Type)(using Context): Tree

Translate ${ t: Expr[T] } into expression t.splice while tracking the quotation level in the context

Translate ${ t: Expr[T] } into expression t.splice while tracking the quotation level in the context

Attributes