File tree 6 files changed +15
-5
lines changed
src-bootstrapped/scala/quoted 6 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1
1
package scala .quoted
2
2
3
- /** Quoted expression of type `T` */
3
+ /** Quoted expression of type `T`.
4
+ *
5
+ * `Expr` has extension methods that are defined in `scala.quoted.Quotes`.
6
+ */
4
7
abstract class Expr [+ T ] private [scala]
5
8
9
+ /** Constructors for expressions */
6
10
object Expr {
7
11
8
12
/** `e.betaReduce` returns an expression that is functionally equivalent to `e`,
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ trait FromExpr[T] {
21
21
22
22
}
23
23
24
+ /** Default given instances of `FromExpr` */
24
25
object FromExpr {
25
26
26
27
/** Default implementation of `FromExpr[Boolean]`
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ trait ToExpr[T] {
12
12
13
13
}
14
14
15
+ /** Default given instances of `ToExpr` */
15
16
object ToExpr {
16
17
17
18
// IMPORTANT Keep in sync with tests/run-staging/liftables.scala
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import scala.reflect.TypeTest
5
5
/** Current Quotes in scope */
6
6
inline def quotes (using q : Quotes ): q.type = q
7
7
8
- /** Quotation context provided by a macro expansion or in the scope of `scala.quoted.run`.
8
+ /** Quotation context provided by a macro expansion or in the scope of `scala.quoted.staging. run`.
9
9
* Used to perform all operations on quoted `Expr` or `Type`.
10
10
*
11
11
* It contains the low-level Typed AST API metaprogramming API.
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ package scala.quoted
2
2
3
3
import scala .annotation .compileTimeOnly
4
4
5
- /** Quoted type (or kind ) `T` */
5
+ /** Type (or type constructor ) `T` needed contextually when using `T` in a quoted expression `'{... T ...} ` */
6
6
abstract class Type [T <: AnyKind ] private [scala]:
7
7
/** The type represented `Type` */
8
8
type Underlying = T
9
9
end Type
10
10
11
- /** Some basic type tags, currently incomplete */
11
+ /** Methods to interact with the current `Type[T]` in scope */
12
12
object Type :
13
13
14
14
/** Show a source code like representation of this type without syntax highlight */
Original file line number Diff line number Diff line change 1
1
package scala .quoted
2
2
3
- /** Literal sequence of expressions */
3
+ /** Expression reepresentation of literal sequence of expressions.
4
+ *
5
+ * `Varargs` can be used to create the an expression `args` that will be used as varargs `'{ f($args: _*) }`
6
+ * or it can be used to extract all the arguments of the a varargs.
7
+ */
4
8
object Varargs {
5
9
6
10
/** Lifts this sequence of expressions into an expression of a sequence
You can’t perform that action at this time.
0 commit comments