diff --git a/docs/docs/reference/metaprogramming/tasty-reflect.md b/docs/docs/reference/metaprogramming/tasty-reflect.md index bdf3fe6a52ec..94b4d83ae299 100644 --- a/docs/docs/reference/metaprogramming/tasty-reflect.md +++ b/docs/docs/reference/metaprogramming/tasty-reflect.md @@ -58,8 +58,14 @@ def natConstImpl(x: Expr[Int])(using Quotes): Expr[Int] = { } ``` -To easily know which extractors are needed, the `showExtractors` method on a -`quotes.reflect.Term` returns the string representation of the extractors. +We can easily know which extractors are needed using `Printer.TreeStructure.show`, which returns the string representation the structure of the tree. Other printers can also be found in the `Printer` module. + +```scala +xTree.show(using Printer.TreeStructure) +// or +Printer.TreeStructure.show(xTree) +``` + The methods `quotes.reflect.Term.{asExpr, asExprOf}` provide a way to go back to a `quoted.Expr`. Note that `asExpr` returns a `Expr[Any]`.