From de77b9e370341fd2fdad06113779ef187a0f5f9d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 9 Jan 2022 22:56:33 -0500 Subject: stop parsing command lines at all in the main shell process --- src/parse/ast.rs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/parse/ast.rs') 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, - 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) -> 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, } } } -- cgit v1.2.3-54-g00ecf