|
| 1 | +package scala.internal.quoted |
| 2 | + |
| 3 | +import scala.annotation.{Annotation, compileTimeOnly} |
| 4 | +import scala.quoted._ |
| 5 | + |
| 6 | +@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime`") |
| 7 | +object CompileTime { |
| 8 | + |
| 9 | + /** A term quote is desugared by the compiler into a call to this method */ |
| 10 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.exprQuote`") |
| 11 | + def exprQuote[T](x: T): QuoteContext ?=> Expr[T] = ??? |
| 12 | + |
| 13 | + /** A term splice is desugared by the compiler into a call to this method */ |
| 14 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.exprSplice`") |
| 15 | + def exprSplice[T](x: QuoteContext ?=> Expr[T]): T = ??? |
| 16 | + |
| 17 | + /** A term splice nested within a quote is desugared by the compiler into a call to this method. |
| 18 | + * `ctx` is the `QuoteContext` that the quote of this splice uses. |
| 19 | + */ |
| 20 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.exprNestedSplice`") |
| 21 | + def exprNestedSplice[T](ctx: QuoteContext)(x: ctx.NestedContext ?=> Expr[T]): T = ??? |
| 22 | + |
| 23 | + /** A type quote is desugared by the compiler into a call to this method */ |
| 24 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.typeQuote`") |
| 25 | + def typeQuote[T <: AnyKind]: Type[T] = ??? |
| 26 | + |
| 27 | + /** A splice in a quoted pattern is desugared by the compiler into a call to this method */ |
| 28 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternHole`") |
| 29 | + def patternHole[T]: T = ??? |
| 30 | + |
| 31 | + /** A splice of a name in a quoted pattern is desugared by wrapping getting this annotation */ |
| 32 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternBindHole`") |
| 33 | + class patternBindHole extends Annotation |
| 34 | + |
| 35 | + /** A splice of a name in a quoted pattern is that marks the definition of a type splice */ |
| 36 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternType`") |
| 37 | + class patternType extends Annotation |
| 38 | + |
| 39 | + /** A type pattern that must be aproximated from above */ |
| 40 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.fromAbove`") |
| 41 | + class fromAbove extends Annotation |
| 42 | + |
| 43 | + /** Artifact of pickled type splices |
| 44 | + * |
| 45 | + * During quote reification a quote `'{ ... F[$t] ... }` will be transformed into |
| 46 | + * `'{ @quoteTypeTag type T$1 = $t ... F[T$1] ... }` to have a tree for `$t`. |
| 47 | + * This artifact is removed during quote unpickling. |
| 48 | + * |
| 49 | + * See ReifyQuotes.scala and PickledQuotes.scala |
| 50 | + */ |
| 51 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.quoteTypeTag`") |
| 52 | + class quoteTypeTag extends Annotation |
| 53 | + |
| 54 | +} |
0 commit comments