-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1162 from 0xPolygonMiden/andrew-support-stdlib-in…
…-repl Support libraries in Miden REPL
- Loading branch information
Showing
4 changed files
with
121 additions
and
18 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,15 +1,24 @@ | ||
use clap::Parser; | ||
use std::path::PathBuf; | ||
|
||
use crate::repl::start_repl; | ||
|
||
#[derive(Debug, Clone, Parser)] | ||
#[clap(about = "Initiates the Miden REPL tool")] | ||
pub struct ReplCmd {} | ||
pub struct ReplCmd { | ||
/// Paths to .masl library files | ||
#[clap(short = 'l', long = "libraries", value_parser)] | ||
library_paths: Vec<PathBuf>, | ||
|
||
/// Usage of standard library | ||
#[clap(short = 's', long = "stdlib")] | ||
use_stdlib: bool, | ||
} | ||
|
||
impl ReplCmd { | ||
pub fn execute(&self) -> Result<(), String> { | ||
// initiates repl tool. | ||
start_repl(); | ||
start_repl(&self.library_paths, self.use_stdlib); | ||
Ok(()) | ||
} | ||
} |
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