forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sort output before printing in REPL & move rendering
- Loading branch information
Showing
7 changed files
with
117 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
package dotty.tools | ||
|
||
import dotc.core.Contexts.Context | ||
import dotc.core.Symbols.Symbol | ||
import dotc.printing.ReplPrinter | ||
import dotc.reporting.{HideNonSensicalMessages, StoreReporter, UniqueMessagePositions} | ||
|
||
package object repl { | ||
/** Create empty outer store reporter */ | ||
private[repl] def newStoreReporter: StoreReporter = | ||
new StoreReporter(null) | ||
with UniqueMessagePositions with HideNonSensicalMessages | ||
|
||
private[repl] implicit class ShowUser(val s: Symbol) extends AnyVal { | ||
def showUser(implicit ctx: Context): String = { | ||
val printer = new ReplPrinter(ctx) | ||
val text = printer.dclText(s) | ||
text.mkString(ctx.settings.pageWidth.value, ctx.settings.printLines.value) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters