Parse MATCH SET statement: MATCH pattern... [WITH ...] [WHERE condition] SET item, item
(tokens: &[Token])
| 3971 | |
| 3972 | /// Parse MATCH SET statement: MATCH pattern... [WITH ...] [WHERE condition] SET item, item |
| 3973 | fn match_set_statement(tokens: &[Token]) -> IResult<&[Token], MatchSetStatement> { |
| 3974 | log::debug!( |
| 3975 | "PARSER: match_set_statement called with first 5 tokens: {:?}", |
| 3976 | tokens.get(0..5).unwrap_or(&[]) |
| 3977 | ); |
| 3978 | let result = map( |
| 3979 | tuple(( |
| 3980 | match_clause, |
| 3981 | opt(with_clause), |
| 3982 | opt(where_clause), |
| 3983 | expect_token(Token::Set), |
| 3984 | separated_list1(expect_token(Token::Comma), set_item), |
| 3985 | )), |
| 3986 | |(match_clause, with_clause_opt, where_clause_opt, _, items)| { |
| 3987 | log::debug!( |
| 3988 | "PARSER: Successfully parsed MatchSetStatement with WITH clause: {}", |
| 3989 | with_clause_opt.is_some() |
| 3990 | ); |
| 3991 | MatchSetStatement { |
| 3992 | match_clause, |
| 3993 | with_clause: with_clause_opt, |
| 3994 | where_clause: where_clause_opt, |
| 3995 | items, |
| 3996 | location: Location::default(), |
| 3997 | } |
| 3998 | }, |
| 3999 | )(tokens); |
| 4000 | |
| 4001 | match &result { |
| 4002 | Ok((remaining, _)) => log::debug!( |
| 4003 | "PARSER: match_set_statement succeeded, remaining tokens: {}", |
| 4004 | remaining.len() |
| 4005 | ), |
| 4006 | Err(e) => log::debug!("PARSER: match_set_statement failed: {:?}", e), |
| 4007 | } |
| 4008 | |
| 4009 | result |
| 4010 | } |
| 4011 | |
| 4012 | /// Parse MATCH REMOVE statement: MATCH pattern... [WITH ...] [WHERE condition] REMOVE item, item |
| 4013 | fn match_remove_statement(tokens: &[Token]) -> IResult<&[Token], MatchRemoveStatement> { |
nothing calls this directly
no test coverage detected