diff --git a/leo/cli/cli.rs b/leo/cli/cli.rs index 7542f4ad35..33fde7763c 100644 --- a/leo/cli/cli.rs +++ b/leo/cli/cli.rs @@ -82,10 +82,10 @@ enum Commands { #[clap(flatten)] command: LeoBuild, }, - #[clap(about = "Interpret the current package")] - Interpret { + #[clap(about = "Debug the current package via the interpreter")] + Debug { #[clap(flatten)] - command: LeoInterpret, + command: LeoDebug, }, #[clap(about = "Add a new on-chain or local dependency to the current package.")] Add { @@ -138,7 +138,7 @@ pub fn run_with_args(cli: CLI) -> Result<()> { Commands::Account { command } => command.try_execute(context), Commands::New { command } => command.try_execute(context), Commands::Build { command } => command.try_execute(context), - Commands::Interpret { command } => command.try_execute(context), + Commands::Debug { command } => command.try_execute(context), Commands::Query { command } => command.try_execute(context), Commands::Clean { command } => command.try_execute(context), Commands::Deploy { command } => command.try_execute(context), diff --git a/leo/cli/commands/interpret.rs b/leo/cli/commands/debug.rs similarity index 89% rename from leo/cli/commands/interpret.rs rename to leo/cli/commands/debug.rs index 82601e887e..febc9dc0f2 100644 --- a/leo/cli/commands/interpret.rs +++ b/leo/cli/commands/debug.rs @@ -27,14 +27,14 @@ use leo_span::Symbol; use super::*; -/// Interprets an Aleo program. +/// Debugs an Aleo program through the interpreter. #[derive(Parser, Debug)] -pub struct LeoInterpret { +pub struct LeoDebug { #[clap(flatten)] pub(crate) compiler_options: BuildOptions, } -impl Command for LeoInterpret { +impl Command for LeoDebug { type Input = ::Output; type Output = (); @@ -50,24 +50,24 @@ impl Command for LeoInterpret { // Parse the network. let network = NetworkName::try_from(context.get_network(&self.compiler_options.network)?)?; match network { - NetworkName::TestnetV0 => handle_interpret::(&self, context), + NetworkName::TestnetV0 => handle_debug::(&self, context), NetworkName::MainnetV0 => { #[cfg(feature = "only_testnet")] panic!("Mainnet chosen with only_testnet feature"); #[cfg(not(feature = "only_testnet"))] - return handle_interpret::(&self, context); + return handle_debug::(&self, context); } NetworkName::CanaryV0 => { #[cfg(feature = "only_testnet")] panic!("Canary chosen with only_testnet feature"); #[cfg(not(feature = "only_testnet"))] - return handle_interpret::(&self, context); + return handle_debug::(&self, context); } } } } -fn handle_interpret(command: &LeoInterpret, context: Context) -> Result<()> { +fn handle_debug(command: &LeoDebug, context: Context) -> Result<()> { // Get the package path. let package_path = context.dir()?; let home_path = context.home()?; diff --git a/leo/cli/commands/mod.rs b/leo/cli/commands/mod.rs index 31da9d779e..55bc8faccb 100644 --- a/leo/cli/commands/mod.rs +++ b/leo/cli/commands/mod.rs @@ -26,6 +26,9 @@ pub use build::LeoBuild; pub mod clean; pub use clean::LeoClean; +pub mod debug; +pub use debug::LeoDebug; + pub mod deploy; pub use deploy::Deploy; @@ -35,9 +38,6 @@ pub use example::LeoExample; pub mod execute; pub use execute::LeoExecute; -pub mod interpret; -pub use interpret::LeoInterpret; - pub mod query; pub use query::LeoQuery;