summaryrefslogtreecommitdiffstats
path: root/src/parse/ast.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-09 22:56:33 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-09 22:56:33 -0500
commitde77b9e370341fd2fdad06113779ef187a0f5f9d (patch)
treef68f6b01786f9d1fb06ed2d2dd3860e21a62cf02 /src/parse/ast.rs
parent3c30ee54cd8dc8c9bf43beb54ee1fe0292c07c90 (diff)
downloadnbsh-de77b9e370341fd2fdad06113779ef187a0f5f9d.tar.gz
nbsh-de77b9e370341fd2fdad06113779ef187a0f5f9d.zip
stop parsing command lines at all in the main shell process
Diffstat (limited to 'src/parse/ast.rs')
-rw-r--r--src/parse/ast.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/parse/ast.rs b/src/parse/ast.rs
index ca568eb..37e7fe0 100644
--- a/src/parse/ast.rs
+++ b/src/parse/ast.rs
@@ -9,7 +9,6 @@ struct Shell;
#[derive(Debug, PartialEq, Eq)]
pub struct Commands {
commands: Vec<Command>,
- input_string: String,
}
impl Commands {
@@ -29,16 +28,10 @@ impl Commands {
&self.commands
}
- pub fn input_string(&self) -> &str {
- &self.input_string
- }
-
fn build_ast(commands: pest::iterators::Pair<Rule>) -> Self {
assert!(matches!(commands.as_rule(), Rule::commands));
- let input_string = commands.as_str().to_string();
Self {
commands: commands.into_inner().map(Command::build_ast).collect(),
- input_string,
}
}
}