@@ -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`.
@@ -184,7 +196,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
184
196
*
185
197
* @syntax markdown
186
198
*/
187
- trait Reflection { self : reflect.type =>
199
+ trait reflectModule { self : reflect.type =>
188
200
189
201
// /////////////
190
202
// TREES //
@@ -3013,7 +3025,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3013
3025
* It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3014
3026
* this symbol to the ValDef constructor.
3015
3027
*
3016
- * Note: Also see Reflection .let
3028
+ * Note: Also see reflect .let
3017
3029
*
3018
3030
* @param flags extra flags to with which the symbol should be constructed
3019
3031
* @param privateWithin the symbol within which this new method symbol should be private. May be noSymbol.
@@ -3768,7 +3780,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3768
3780
// UTILS //
3769
3781
// /////////////
3770
3782
3771
- /** TASTy Reflect tree accumulator.
3783
+ /** Customizable Tree accumulator.
3772
3784
*
3773
3785
* Usage:
3774
3786
* ```
@@ -3871,7 +3883,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3871
3883
end TreeAccumulator
3872
3884
3873
3885
3874
- /** TASTy Reflect tree traverser.
3886
+ /** Customizable tree traverser.
3875
3887
*
3876
3888
* Usage:
3877
3889
* ```
@@ -3891,7 +3903,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3891
3903
3892
3904
end TreeTraverser
3893
3905
3894
- /** TASTy Reflect tree map .
3906
+ /** Customizable tree mapper .
3895
3907
*
3896
3908
* Usage:
3897
3909
* ```
0 commit comments