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
7
7
import config .Printers
8
8
import core .Mode
9
9
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
+
10
25
abstract class TraceSyntax {
11
26
val isForced : Boolean
12
27
@@ -101,10 +116,3 @@ abstract class TraceSyntax {
101
116
}
102
117
}
103
118
}
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