diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-05-12 14:26:16 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-05-12 14:26:16 +0200 |
commit | dc36755731c92771647531427e390076e558567d (patch) | |
tree | 03e7cea4c0bf8a1487a8b03ccd0f98bb06254376 /src/dotty/tools/dotc/repl/REPL.scala | |
parent | fdf24243ffa07bdcef94032234d36170363bd8bb (diff) | |
download | dotty-dc36755731c92771647531427e390076e558567d.tar.gz dotty-dc36755731c92771647531427e390076e558567d.tar.bz2 dotty-dc36755731c92771647531427e390076e558567d.zip |
Add CLI option to disable REPL syntax highlighting
Diffstat (limited to 'src/dotty/tools/dotc/repl/REPL.scala')
-rw-r--r-- | src/dotty/tools/dotc/repl/REPL.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/repl/REPL.scala b/src/dotty/tools/dotc/repl/REPL.scala index 1f5e3347b..977f67719 100644 --- a/src/dotty/tools/dotc/repl/REPL.scala +++ b/src/dotty/tools/dotc/repl/REPL.scala @@ -25,6 +25,11 @@ class REPL extends Driver { lazy val config = new REPL.Config + override def setup(args: Array[String], rootCtx: Context): (List[String], Context) = { + val (strs, ctx) = super.setup(args, rootCtx) + (strs, config.context(ctx)) + } + override def newCompiler(implicit ctx: Context): Compiler = new repl.CompilingInterpreter(config.output, ctx) @@ -45,6 +50,8 @@ object REPL { val continuationPrompt = " | " val version = ".next (pre-alpha)" + def context(ctx: Context): Context = ctx + /** The default input reader */ def input(in: Interpreter)(implicit ctx: Context): InteractiveReader = { val emacsShell = System.getProperty("env.emacs", "") != "" |