|
| 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): (given 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: (given QuoteContext) => Expr[T]): T = ??? |
| 16 | + |
| 17 | + /** A type quote is desugared by the compiler into a call to this method */ |
| 18 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.typeQuote`") |
| 19 | + def typeQuote[T <: AnyKind]: Type[T] = ??? |
| 20 | + |
| 21 | + /** A splice in a quoted pattern is desugared by the compiler into a call to this method */ |
| 22 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternHole`") |
| 23 | + def patternHole[T]: T = ??? |
| 24 | + |
| 25 | + /** A splice of a name in a quoted pattern is desugared by wrapping getting this annotation */ |
| 26 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternBindHole`") |
| 27 | + class patternBindHole extends Annotation |
| 28 | + |
| 29 | + /** A splice of a name in a quoted pattern is that marks the definition of a type splice */ |
| 30 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternType`") |
| 31 | + class patternType extends Annotation |
| 32 | + |
| 33 | + /** A type pattern that must be aproximated from above */ |
| 34 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.fromAbove`") |
| 35 | + class fromAbove extends Annotation |
| 36 | + |
| 37 | + /** Artifact of pickled type splices |
| 38 | + * |
| 39 | + * During quote reification a quote `'{ ... F[$t] ... }` will be transformed into |
| 40 | + * `'{ @quoteTypeTag type T$1 = $t ... F[T$1] ... }` to have a tree for `$t`. |
| 41 | + * This artifact is removed during quote unpickling. |
| 42 | + * |
| 43 | + * See ReifyQuotes.scala and PickledQuotes.scala |
| 44 | + */ |
| 45 | + @compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.quoteTypeTag`") |
| 46 | + class quoteTypeTag extends Annotation |
| 47 | + |
| 48 | +} |
0 commit comments