@@ -6,7 +6,7 @@ import scala.reflect.TypeTest
66/** Current Quotes in scope
77 *
88 * Usage:
9- * ```scala
9+ * ```scala sc:nocompile
1010 * def myExpr[T](using Quotes): Expr[T] = {
1111 * import quotes.reflect._
1212 * ...
@@ -31,7 +31,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3131
3232 /** Pattern matches `this` against `that`. Effectively performing a deep equality check.
3333 * It does the equivalent of
34- * ```scala
34+ * ```scala sc:nocompile
3535 * this match
3636 * case '{...} => true // where the contents of the pattern are the contents of `that`
3737 * case _ => false
@@ -91,7 +91,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
9191 * def f(expr: Expr[Int])(using Quotes) =
9292 * import quotes.reflect._
9393 * val ast: Term = expr.asTerm
94- * ...
94+ * ???
9595 * ```
9696 *
9797 * See `reflectModule` for full API.
@@ -294,15 +294,15 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
294294
295295 /** Tree representing a package clause in the source code
296296 *
297- * ```scala
297+ * ```scala sc:nocompile
298298 * package foo {
299- * // package stats
299+ * // package stats
300300 * }
301301 * ```
302302 *
303303 * or
304304 *
305- * ```scala
305+ * ```scala sc:nocompile
306306 * package foo.bar
307307 * // package stats
308308 * ```
@@ -473,8 +473,11 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
473473 /** Self-type of the class
474474 *
475475 * ```scala
476+ * //{
477+ * type T
478+ * //}
476479 * class C { self: T =>
477- * ...
480+ * ???
478481 * }
479482 * ```
480483 * @syntax markdown
@@ -484,7 +487,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
484487 *
485488 * ```scala
486489 * class C {
487- * ... // statements
490+ * ??? // statements
488491 * }
489492 * ```
490493 * @syntax markdown
@@ -532,7 +535,11 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
532535 *
533536 * Note: Non leading type parameters can be found in extension methods such as
534537 * ```scala
535- * extension (a: A) def f[T]() = ...
538+ * //{
539+ * type A
540+ * type T
541+ * //}
542+ * extension (a: A) def f[T]() = ???
536543 * ```
537544 * @syntax markdown
538545 */
@@ -543,7 +550,11 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
543550 *
544551 * Non leading type parameters can be found in extension methods such as
545552 * ```scala
546- * extension (a: A) def f[T]() = ...
553+ * //{
554+ * type T
555+ * type A
556+ * //}
557+ * extension (a: A) def f[T]() = ???
547558 * ```
548559 * @syntax markdown
549560 */
@@ -1014,7 +1025,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
10141025 *
10151026 * It may be a partially applied method:
10161027 * ```scala
1017- * def f(x1: Int)(x2: Int) = ...
1028+ * def f(x1: Int)(x2: Int) = ???
10181029 * f(1)(2)
10191030 * ```
10201031 * - `fun` is `f(1)` in the `Apply` of `f(1)(2)`
@@ -1026,7 +1037,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
10261037 *
10271038 * The `Apply` may be a partially applied method:
10281039 * ```scala
1029- * def f(x1: Int)(x2: Int) = ...
1040+ * def f(x1: Int)(x2: Int) = ???
10301041 * f(1)(2)
10311042 * ```
10321043 * - `args` is `(2)` in the `Apply` of `f(1)(2)`
@@ -1068,9 +1079,12 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
10681079 *
10691080 * It may be a partially applied method:
10701081 * ```scala
1071- * extension (x: Int) def f[T](y: T) = ...
1082+ * //{
1083+ * type T
1084+ * //}
1085+ * extension (x: Int) def f[T](y: T) = ???
10721086 * // represented as
1073- * // def f(x: Int)[T](y: T) = ...
1087+ * // def f(x: Int)[T](y: T) = ???
10741088 *
10751089 * 1.f[Int](2)
10761090 * // represented as
@@ -1084,9 +1098,12 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
10841098 *
10851099 * The `TypeApply` may be a partially applied method:
10861100 * ```scala
1087- * extension (x: Int) def f[T](y: T) = ...
1101+ * //{
1102+ * type T
1103+ * //}
1104+ * extension (x: Int) def f[T](y: T) = ???
10881105 * // represented as
1089- * // def f(x: Int)[T](y: T) = ...
1106+ * // def f(x: Int)[T](y: T) = ???
10901107 *
10911108 * 1.f[Int](2)
10921109 * // represented as
@@ -1273,7 +1290,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
12731290 /** A lambda `(...) => ...` in the source code is represented as
12741291 * a local method and a closure:
12751292 *
1276- * ```scala
1293+ * ```scala sc:nocompile
12771294 * {
12781295 * def m(...) = ...
12791296 * closure(m)
@@ -1289,7 +1306,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
12891306 /** Methods of the module object `val Lambda` */
12901307 trait LambdaModule { this : Lambda .type =>
12911308 /** Matches a lambda definition of the form
1292- * ```scala
1309+ * ```scala sc:nocompile
12931310 * Block((DefDef(_, _, params :: Nil, _, Some(body))) :: Nil, Closure(meth, _))
12941311 * ```
12951312 * Extracts the parameter definitions and body.
@@ -1298,7 +1315,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
12981315 def unapply (tree : Block ): Option [(List [ValDef ], Term )]
12991316
13001317 /** Generates a lambda with the given method type.
1301- * ```scala
1318+ * ```scala sc:nocompile
13021319 * Block((DefDef(_, _, params :: Nil, _, Some(rhsFn(meth, paramRefs)))) :: Nil, Closure(meth, _))
13031320 * ```
13041321 * @param owner: owner of the generated `meth` symbol
@@ -2432,9 +2449,16 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
24322449 *
24332450 * Usage:
24342451 * ```scala
2452+ * //{
2453+ * def f(using Quotes) = {
2454+ * val typeRepr: TypeRepr = ???
2455+ * //}
24352456 * typeRepr.asType match
24362457 * case '[t] =>
2437- * '{ val x: t = ... }
2458+ * '{ val x: t = ??? }
2459+ * //{
2460+ * }
2461+ * //}
24382462 * ```
24392463 * @syntax markdown
24402464 */
@@ -2809,12 +2833,15 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
28092833 *
28102834 * May represent by-name parameter such as `thunk` in
28112835 * ```scala
2812- * def log[T](thunk: =>T): T = ...
2836+ * //{
2837+ * type T
2838+ * //}
2839+ * def log[T](thunk: => T): T = ???
28132840 * ```
28142841 *
28152842 * May also represent a the return type of a parameterless method definition such as
28162843 * ```scala
2817- * def foo: Int = ...
2844+ * def foo: Int = ???
28182845 * ```
28192846 * @syntax markdown
28202847 */
@@ -3451,7 +3478,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
34513478 /** Symbol of the definition that encloses the current splicing context.
34523479 *
34533480 * For example, the following call to `spliceOwner` would return the symbol `x`.
3454- * ```scala
3481+ * ```scala sc:nocompile
34553482 * val x = ${ ... Symbol.spliceOwner ... }
34563483 * ```
34573484 *
@@ -4298,9 +4325,8 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
42984325 *
42994326 * Usage:
43004327 * ```scala
4301- * import quotes.reflect._
4302- * class MyTreeAccumulator extends TreeAccumulator[X] {
4303- * def foldTree(x: X, tree: Tree)(owner: Symbol): X = ...
4328+ * class MyTreeAccumulator[X] extends TreeAccumulator[X] {
4329+ * def foldTree(x: X, tree: Tree)(owner: Symbol): X = ???
43044330 * }
43054331 * ```
43064332 * @syntax markdown
@@ -4402,9 +4428,8 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
44024428 *
44034429 * Usage:
44044430 * ```scala
4405- * import quotes.reflect._
44064431 * class MyTraverser extends TreeTraverser {
4407- * override def traverseTree(tree: Tree)(owner: Symbol): Unit = ...
4432+ * override def traverseTree(tree: Tree)(owner: Symbol): Unit = ???
44084433 * }
44094434 * ```
44104435 * @syntax markdown
@@ -4423,9 +4448,8 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
44234448 *
44244449 * Usage:
44254450 * ```scala
4426- * import quotes.reflect._
44274451 * class MyTreeMap extends TreeMap {
4428- * override def transformTree(tree: Tree)(owner: Symbol): Tree = ...
4452+ * override def transformTree(tree: Tree)(owner: Symbol): Tree = ???
44294453 * }
44304454 * ```
44314455 * @syntax markdown
0 commit comments