QuotesAndSplices

dotty.tools.dotc.typer.QuotesAndSplices
See theQuotesAndSplices companion object

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

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Typer
class ReTyper
class InlineTyper
class Typer
class Checker
class LocalChecker
Show all
Self type

Members list

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 typedQuotePattern(tree: QuotePattern, pt: Type)(using Context): Tree
def typedQuotedTypeVar(tree: Ident, pt: Type)(using Context): Tree

Type check a type binding reference in a quoted pattern.

Type check a type binding reference in a quoted pattern.

If no binding exists with that name, this becomes the definition of a new type binding.

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