File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,21 @@ import config.Config
77import config .Printers
88import core .Mode
99
10+ /** Exposes the {{{ trace("question") { op } }}} syntax.
11+ *
12+ * Traced operations will print indented messages if enabled.
13+ * Tracing depends on [[Config.tracingEnabled ]] and [[dotty.tools.dotc.config.ScalaSettings.Ylog ]].
14+ * Tracing can be forced by replacing [[trace ]] with [[trace.force ]] (see below).
15+ */
16+ object trace extends TraceSyntax {
17+ final val isForced = false
18+
19+ /** Forces a particular trace to be printed out regardless of tracing being enabled. */
20+ object force extends TraceSyntax {
21+ final val isForced = true
22+ }
23+ }
24+
1025abstract class TraceSyntax {
1126 val isForced : Boolean
1227
@@ -101,10 +116,3 @@ abstract class TraceSyntax {
101116 }
102117 }
103118}
104-
105- object trace extends TraceSyntax {
106- final val isForced = false
107- object force extends TraceSyntax {
108- final val isForced = true
109- }
110- }
You can’t perform that action at this time.
0 commit comments