diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-15 03:42:31 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-15 03:42:31 +0800 |
| commit | 57e20f69efea609d8332cc39d223f4aa46be3c78 (patch) | |
| tree | 42e0aa5435a9cb03bba49b4aa3838105f056bae2 /mingling_core/src/program/repl_exec.rs | |
| parent | ec6c87d12062576271231b88364a4aa00765ae65 (diff) | |
feat(core): add public ArgumentSplitter utility
Move the REPL's argument splitting logic into a new public `utils`
module exposing the `ArgumentSplitter` trait for reuse by downstream
code.
Diffstat (limited to 'mingling_core/src/program/repl_exec.rs')
| -rw-r--r-- | mingling_core/src/program/repl_exec.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mingling_core/src/program/repl_exec.rs b/mingling_core/src/program/repl_exec.rs index b91f7bc..2db5c5a 100644 --- a/mingling_core/src/program/repl_exec.rs +++ b/mingling_core/src/program/repl_exec.rs @@ -7,10 +7,8 @@ use std::io::Write; #[doc(hidden)] pub mod res; -mod splitter; - use crate::error::{ProgramInternalExecuteError, ProgramPanic}; -use crate::program::repl_exec::splitter::split_input_string; +use crate::utils::ArgumentSplitter; use crate::{Program, ProgramCollect, RenderResult}; use crate::{program::repl_exec::res::ResREPL, this}; @@ -58,7 +56,7 @@ where line: &mut readline, }); - let mut args = split_input_string(&readline); + let mut args = readline.split_args(); p.run_hook_repl_pre_exec(&crate::hook::HookREPLPreExecInfo { args: &args }); match might_be_async::invoke!(exec_once(p, &mut args)) { |
