diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-10-02 07:14:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 01:14:55 +0200 |
commit | 4c779b5e8ca427faf24c26443a8054004827d450 (patch) | |
tree | ddb8ded427e4987f2edbb63c1be3661569e0d204 /cli/worker.rs | |
parent | 5590b97670206df957c43742f47601356982c658 (diff) |
refactor(repl): use an inspector session (#7763)
This ports the REPL over to Rust and makes use of an inspector session to run a REPL on top of any isolate which lets make full use of rustylines various things like validators and completors without having to introduce a bunch of hard to test internal ops and glue code.
An accidental but good side effect of this is that the multiple line input we previously had is now an editable multi-line input prompt that is correctly stored in the history as a single entry.
Diffstat (limited to 'cli/worker.rs')
-rw-r--r-- | cli/worker.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/worker.rs b/cli/worker.rs index 242a2f4b3..08ccd418e 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -134,7 +134,7 @@ impl Worker { &mut isolate, Some(inspector_server.clone()), )) - } else if global_state.flags.coverage { + } else if global_state.flags.coverage || global_state.flags.repl { Some(DenoInspector::new(&mut isolate, None)) } else { None @@ -309,7 +309,6 @@ impl MainWorker { ops::permissions::init(&mut worker); ops::plugin::init(&mut worker); ops::process::init(&mut worker); - ops::repl::init(&mut worker); ops::runtime_compiler::init(&mut worker); ops::signal::init(&mut worker); ops::tls::init(&mut worker); |