From aa81f458d01a9afc201156d4c2dc74e56d626fcc Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 16 Apr 2019 00:52:05 -0700 Subject: [PATCH] Remove stray source files (#408) --- functions.rs | 30 ------------------------------ variables.rs | 28 ---------------------------- 2 files changed, 58 deletions(-) delete mode 100644 functions.rs delete mode 100644 variables.rs diff --git a/functions.rs b/functions.rs deleted file mode 100644 index 7caa80e..0000000 --- a/functions.rs +++ /dev/null @@ -1,30 +0,0 @@ -use crate::common::*; - -pub struct Functions<'a> { - stack: Vec<&'a Expression<'a>>, -} - -impl<'a> Iterator for Functions<'a> { - type Item = (&'a Token<'a>, usize); - - fn next(&mut self) -> Option { - match self.stack.pop() { - None - | Some(Expression::String { .. }) - | Some(Expression::Backtick { .. }) - | Some(Expression::Variable { .. }) => None, - Some(Expression::Call { - token, arguments, .. - }) => Some((token, arguments.len())), - Some(Expression::Concatination { lhs, rhs }) => { - self.stack.push(lhs); - self.stack.push(rhs); - self.next() - } - Some(Expression::Group { expression }) => { - self.stack.push(expression); - self.next() - } - } - } -} diff --git a/variables.rs b/variables.rs deleted file mode 100644 index 678da00..0000000 --- a/variables.rs +++ /dev/null @@ -1,28 +0,0 @@ -use crate::common::*; - -pub struct Variables<'a> { - stack: Vec<&'a Expression<'a>>, -} - -impl<'a> Iterator for Variables<'a> { - type Item = &'a Token<'a>; - - fn next(&mut self) -> Option<&'a Token<'a>> { - match self.stack.pop() { - None - | Some(Expression::String { .. }) - | Some(Expression::Backtick { .. }) - | Some(Expression::Call { .. }) => None, - Some(Expression::Variable { token, .. }) => Some(token), - Some(Expression::Concatination { lhs, rhs }) => { - self.stack.push(lhs); - self.stack.push(rhs); - self.next() - } - Some(Expression::Group { expression }) => { - self.stack.push(expression); - self.next() - } - } - } -}