From 52277c3025d65e6669e1e9b19948055383ca872f Mon Sep 17 00:00:00 2001 From: Nickolay Ponomarev Date: Fri, 11 Jan 2019 01:54:57 +0300 Subject: [PATCH] Remove parse_function_or_pg_cast, since `fn(...) :: type` is taken care of in parse_infix() --- src/sqlparser.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/sqlparser.rs b/src/sqlparser.rs index d0aa1fa3..ead70a78 100644 --- a/src/sqlparser.rs +++ b/src/sqlparser.rs @@ -108,7 +108,7 @@ impl Parser { self.parse_cast_expression() } else { match self.peek_token() { - Some(Token::LParen) => self.parse_function_or_pg_cast(&id), + Some(Token::LParen) => self.parse_function(&id), Some(Token::Period) => { let mut id_parts: Vec = vec![id]; while self.peek_token() == Some(Token::Period) { @@ -151,15 +151,6 @@ impl Parser { } } - pub fn parse_function_or_pg_cast(&mut self, id: &str) -> Result { - let func = self.parse_function(&id)?; - if let Some(Token::DoubleColon) = self.peek_token() { - self.parse_pg_cast(func) - } else { - Ok(func) - } - } - pub fn parse_function(&mut self, id: &str) -> Result { self.consume_token(&Token::LParen)?; if let Ok(true) = self.consume_token(&Token::RParen) {