File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/plugins
sbt-dotty/sbt-test/sbt-dotty/analyzer-plugin/lib
tests/plugins/custom/analyzer Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ sealed trait Plugin {
2929 * Research plugin receives a phase plan and return a new phase plan, while
3030 * non-research plugin returns a list of phases to be inserted.
3131 *
32- * @note Research plugins only compile with nightly build.
3332 */
3433 def isResearch : Boolean = isInstanceOf [ResearchPlugin ]
3534
@@ -40,6 +39,7 @@ sealed trait Plugin {
4039 val optionsHelp : Option [String ] = None
4140}
4241
42+ /** A standard plugin can be inserted into the normal compilation pipeline */
4343trait StandardPlugin extends Plugin {
4444 /** Non-research plugins should override this method to return the phases
4545 *
@@ -49,6 +49,10 @@ trait StandardPlugin extends Plugin {
4949 def init (options : List [String ]): List [PluginPhase ]
5050}
5151
52+ /** A research plugin may customize the compilation pipeline freely
53+ *
54+ * @note Research plugins are only supported by nightly or snapshot build of the compiler.
55+ */
5256trait ResearchPlugin extends Plugin {
5357 /** Research plugins should override this method to return the new phase plan
5458 *
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ class A(val n: Int) {
44 def this (c : Char ) = this (c.toInt)
55
66 val a = 30 * n
7- // val p = Product("x", 100)
87
98 class B (x : Int ) {
109 def this (c : Char ) = this (c.toInt)
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ class A(val n: Int) {
44 def this (c : Char ) = this (c.toInt)
55
66 val a = 30 * n
7- // val p = Product("x", 100)
87
98 class B (x : Int ) {
109 def this (c : Char ) = this (c.toInt)
You can’t perform that action at this time.
0 commit comments