diff options
| author | Sophie Forrest <git@sophieforrest.com> | 2024-08-30 23:35:45 +1200 |
|---|---|---|
| committer | Sophie Forrest <git@sophieforrest.com> | 2024-08-30 23:35:45 +1200 |
| commit | f5f789540ad7d3f7f4f855c9db69d65cfc190ee0 (patch) | |
| tree | f532988e9a35a0d2c58efbad9daf6e66288f4a1f /src/main.rs | |
| parent | c9ab8d38765c7c80f2ea9083ce8d326f407110ac (diff) | |
feat(engine): allow choosing engine per executor call
Diffstat (limited to '')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 5412735..f5c4740 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,7 +79,10 @@ use std::path::PathBuf; -use brainf_rs::utility::{execute_from_file, execute_from_str}; +use brainf_rs::{ + executor, + utility::{execute_from_file, execute_from_str}, +}; use clap::{Parser, Subcommand}; use miette::Context; @@ -116,9 +119,10 @@ fn main() -> miette::Result<()> { match app.command { Command::File { ref path } => { - execute_from_file(path, &mut tape).wrap_err("when executing from file")?; + execute_from_file::<executor::U8>(path, &mut tape) + .wrap_err("when executing from file")?; } - Command::Text { ref input } => execute_from_str(input, &mut tape)?, + Command::Text { ref input } => execute_from_str::<executor::U8>(input, &mut tape)?, }; Ok(()) |