You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That makes it the same as for scalac. Aligning terminology helps switching between
the two codebases. Also, "frontend" is a bit off, since it is technically two phases,
not one.
Copy file name to clipboardExpand all lines: docs/docs/contributing/debugging.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,16 +91,16 @@ assertPositioned(tree.reporting(s"Tree is: $result"))
91
91
`def (a: A) reporting(f: given WrappedResult[T] => String, p: Printer = Printers.default): A` is defined on all types. The function `f` can be written without the argument since the argument is `given`. The `result` variable is a part of the `WrapperResult` – a tiny framework powering the `reporting` function. Basically, whenever you are using `reporting` on an object`A`, you can use the `result: A` variable from this function and it will be equal to the objectyou are calling `reporting` on.
92
92
93
93
##Printing out trees after phases
94
-
To print out the trees you are compiling after Frontend(scanner, parser, namer, typer) phase:
94
+
To print out the trees you are compiling after the FrontEnd(scanner, parser, namer, typer) phases:
95
95
96
96
```shell
97
-
dotc -Xprint:frontend ../issues/Playground.scala
97
+
dotc -Xprint:typer ../issues/Playground.scala
98
98
```
99
99
100
100
To print out the trees after Frontend and CollectSuperCallsphases:
Every [Positioned](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/ast/Positioned.scala) (a parent class of `Tree`) object has a `uniqueId` field. It is an integer that is unique for that tree and doesn't change from compile run to compile run. You can output these IDs from any printer (such as the ones used by `.show` and `-Xprint`) via `-Yshow-tree-ids` flag, e.g.:
Defined in [Reporter.scala](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/reporting/Reporter.scala). Enables calls such as `ctx.log`, `ctx.error` etc. To enable, run dotc with`-Ylog:frontend` option.
366
+
Defined in [Reporter.scala](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/reporting/Reporter.scala). Enables calls such as `ctx.log`, `ctx.error` etc. To enable, run dotc with`-Ylog:typer` option.
0 commit comments