From e0a33e22ba38124a89da9ec232460e62ef5e25b3 Mon Sep 17 00:00:00 2001 From: Araozu Date: Sat, 23 Dec 2023 18:55:21 -0500 Subject: [PATCH] Re-enable REPL support --- src/cli/mod.rs | 1 + src/cli/repl.rs | 4 ++++ src/cli/types.rs | 1 + 3 files changed, 6 insertions(+) create mode 100644 src/cli/repl.rs diff --git a/src/cli/mod.rs b/src/cli/mod.rs index c585249..133da1e 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -1,6 +1,7 @@ mod compile; mod empty; mod help; +mod repl; mod types; use types::CommandType; diff --git a/src/cli/repl.rs b/src/cli/repl.rs new file mode 100644 index 0000000..7610b48 --- /dev/null +++ b/src/cli/repl.rs @@ -0,0 +1,4 @@ +pub fn repl_command(_arguments: Vec) { + println!("{}", super::get_version()); + let _ = crate::repl::run(); +} diff --git a/src/cli/types.rs b/src/cli/types.rs index 91c8447..2c81e4b 100644 --- a/src/cli/types.rs +++ b/src/cli/types.rs @@ -16,6 +16,7 @@ impl CommandType { match self { CommandType::Help => super::help::help_command(options), CommandType::Compile => super::compile::compile_command(options), + CommandType::Repl => super::repl::repl_command(options), CommandType::None => super::empty::empty_command(options), _ => { println!("Not implemented yet! {:?} {:?}", self, options);