@@ -10,8 +10,6 @@ inline def quotes(using q: Quotes): q.type = q
10
10
*
11
11
* It contains the low-level Typed AST API metaprogramming API.
12
12
* This API does not have the static type guarantiees that `Expr` and `Type` provide.
13
- *
14
- * @param tasty Typed AST API. Usage: `def f(qctx: Quotes) = { import quotes.reflect._; ... }`.
15
13
*/
16
14
trait Quotes { self : runtime.QuoteUnpickler & runtime.QuoteMatching =>
17
15
@@ -66,14 +64,28 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
66
64
def asExprOf (using Type [X ]): Expr [X ]
67
65
end extension
68
66
69
- /** Low-level Typed AST API metaprogramming API.
70
- * This API does not have the static type guarantiees that `Expr` and `Type` provide.
67
+ /** Low-level Typed AST metaprogramming API.
68
+ *
69
+ * Provides all functionality related to AST-based metaprogramming.
70
+ *
71
+ * Usage:
72
+ * ```scala
73
+ * import scala.quoted._
74
+ * def f(expr: Expr[Int])(using Quotes) =
75
+ * import quotes.reflect._
76
+ * val tree: Tree = Term.of(expr)
77
+ * ...
78
+ * ```
79
+ *
80
+ * See `reflectModule` for full API.
81
+ *
82
+ * @syntax markdown
71
83
*/
72
- val reflect : Reflection
84
+ val reflect : reflectModule
73
85
74
- /** AST reflection interface .
86
+ /** Low-level Typed AST metaprogramming API .
75
87
*
76
- * Provides all functionality related with AST based metaprogramming.
88
+ * Provides all functionality related to AST- based metaprogramming.
77
89
*
78
90
* Each type `XYZ` in the API is defined as an abstract type `type XYZ`.
79
91
* Methods on `XYZ` are provided by a `given XYZMethods` which implements extension methods on `XYZ` in the trait `XYZMethods`.
@@ -186,7 +198,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
186
198
*
187
199
* @syntax markdown
188
200
*/
189
- trait Reflection { self : reflect.type =>
201
+ trait reflectModule { self : reflect.type =>
190
202
191
203
// /////////////
192
204
// TREES //
@@ -3032,7 +3044,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3032
3044
* It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3033
3045
* this symbol to the ValDef constructor.
3034
3046
*
3035
- * Note: Also see Reflection .let
3047
+ * Note: Also see reflect .let
3036
3048
*
3037
3049
* @param flags extra flags to with which the symbol should be constructed
3038
3050
* @param privateWithin the symbol within which this new method symbol should be private. May be noSymbol.
@@ -3787,7 +3799,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3787
3799
// UTILS //
3788
3800
// /////////////
3789
3801
3790
- /** TASTy Reflect tree accumulator.
3802
+ /** Customizable Tree accumulator.
3791
3803
*
3792
3804
* Usage:
3793
3805
* ```
@@ -3890,7 +3902,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3890
3902
end TreeAccumulator
3891
3903
3892
3904
3893
- /** TASTy Reflect tree traverser.
3905
+ /** Customizable tree traverser.
3894
3906
*
3895
3907
* Usage:
3896
3908
* ```
@@ -3910,7 +3922,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3910
3922
3911
3923
end TreeTraverser
3912
3924
3913
- /** TASTy Reflect tree map .
3925
+ /** Customizable tree mapper .
3914
3926
*
3915
3927
* Usage:
3916
3928
* ```
0 commit comments