aboutsummaryrefslogtreecommitdiffstats
path: root/src/run/builtin.rs
diff options
context:
space:
mode:
authorJonas Maier <jonas@x77.dev>2026-06-06 12:15:52 +0200
committerJonas Maier <jonas@x77.dev>2026-06-06 12:15:52 +0200
commit53980774c327675e886179c0a2c140744dcf9b95 (patch)
treeca1fdcc9938fce2c10c51e0a51659c6ba38ac5ba /src/run/builtin.rs
parent75e0c29cf91ddc6299c14a94a038c3e3df3d2805 (diff)
downloadpish-53980774c327675e886179c0a2c140744dcf9b95.tar.gz
special cased regex for performance
Diffstat (limited to 'src/run/builtin.rs')
-rw-r--r--src/run/builtin.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/run/builtin.rs b/src/run/builtin.rs
index 87a0be0..45d33e2 100644
--- a/src/run/builtin.rs
+++ b/src/run/builtin.rs
@@ -1039,9 +1039,9 @@ impl Builtin for pish_theme {
#[cfg(debug_assertions)]
mod dbg {
- use crate::parse::regex::{dfa::DFA, enfa::ENFA};
+ use crate::regex::{dfa::DFA, enfa::ENFA};
-use super::*;
+ use super::*;
#[derive(Copy, Clone)]
pub struct debug;
@@ -1107,7 +1107,7 @@ use super::*;
fn name(&self) -> &str {
"case_match"
}
-
+
fn io(
&self,
_session: Arc<Mutex<Session>>,
@@ -1115,12 +1115,12 @@ use super::*;
_stdin: &mut dyn Read,
stdout: &mut dyn Write,
) -> Result {
- let regex = match crate::parse::regex::Pattern::parse_from_bytes(&args[0]) {
+ let regex = match crate::regex::Pattern::parse_from_bytes(&args[0]) {
Ok(r) => r,
Err(e) => {
writeln!(stdout, "parse error: {e:?}")?;
return Err(Error::Exit(1));
- },
+ }
};
let nfa = match ENFA::try_from(regex) {
@@ -1141,4 +1141,4 @@ use super::*;
}
#[cfg(debug_assertions)]
-pub use dbg::{debug, re, case_match};
+pub use dbg::{case_match, debug, re};