Closed
Description
since #13173 parsing has been its own phase
and -Vprint
is a super common way to troubleshoot things, understand better how the compiler works, etc, as code is transformed by successive phases
and with command line scalac you can:
% scalac -Vprint:parser C.scala
[[syntax trees at end of parser]] // C.scala
package <empty> {
class C {}
}
or do the same with -Vprint:all
and see all the phases. but somehow the same thing doesn't work in the REPL:
% scala -Vprint:parser
scala> class C
// defined class C
scala>
% scala -Vprint:all
scala> class C
[[syntax trees at end of typer]] // rs$line$1
the other phases work, but something is special about the combination of REPL and the parser phase.