From dd2f66f2fe7ee687d8c0b7ca6e60ef7221223fb2 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 19 Jun 2026 23:04:37 -0700 Subject: Just cleaned up unsued functions. --- src/parser.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/parser.rs') diff --git a/src/parser.rs b/src/parser.rs index d1fe4d7..4f7ff6a 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -35,6 +35,7 @@ impl<'a> Context<'a> { self.cur[(self.icur+1)%2] } + /* pub fn check_unwrapped bool>(&self, context: &str, f: T) -> CrimResult { if self.cur().is_none() || self.peek().is_none() { Err(CrimError::eos( context )) @@ -42,6 +43,7 @@ impl<'a> Context<'a> { Ok(f( self.cur().unwrap().symbol(), self.peek().unwrap().symbol())) } } + */ pub fn source(&self) -> usize { self.source @@ -50,6 +52,7 @@ impl<'a> Context<'a> { trait SymbolHelper { fn is bool>(&self, context: &str, f: T ) -> CrimResult; + #[allow(dead_code)] fn is_valid_tag_name(&self) -> CrimResult; } @@ -572,11 +575,11 @@ impl<'a> TagBuilder<'a> { pub fn is_unary(&self) -> bool { self.tag_type == TagType::Unary } - +/* pub fn is_multinary_open(&self) -> bool { self.tag_type == TagType::MultinaryOpen } - +*/ pub fn can_have_params(&self) -> bool { match self.name.unwrap().symbol() { SymbolType::View | SymbolType::Output | SymbolType::Loop => true, @@ -598,7 +601,7 @@ impl<'a> TagBuilder<'a> { pub fn can_have_props(&self) -> bool { true } - +/* pub fn can_have_children(&self) -> bool { if self.tag_type == TagType::MultinaryOpen || self.tag_type == TagType::MultinaryMid { @@ -607,7 +610,7 @@ impl<'a> TagBuilder<'a> { false } } - +*/ pub fn is_name(&self, name: &SymbolType<'a>) -> bool { if let Some(a) = self.name { a.symbol() == name @@ -619,11 +622,11 @@ impl<'a> TagBuilder<'a> { pub fn name(&self) -> Option> { self.name } - +/* pub fn params(&self) -> &Vec { &self.params } - +*/ pub fn set_name(&mut self, name: Symbol<'a>) { self.name = Some(name); } @@ -639,19 +642,19 @@ impl<'a> TagBuilder<'a> { pub fn add_child(&mut self, tb: Entry<'a>) { self.children.push( tb ); } - +/* pub fn append_children(&mut self, children: &mut Vec::>) { self.children.append( children ); } - +*/ pub fn add_chain(&mut self, tb: Entry<'a>) { self.chain.push( tb ); } - +/* pub fn set_type(&mut self, tag_type: TagType) { self.tag_type = tag_type; } - +*/ pub fn tag_type(&self) -> TagType { self.tag_type } -- cgit v1.2.3