Parse comma-separated pattern chains.
(text: &str)
| 162 | |
| 163 | /// Parse comma-separated pattern chains. |
| 164 | fn parse_pattern_chains(text: &str) -> crate::Result<Vec<PatternChain>> { |
| 165 | let chain_texts = split_top_level_commas(text); |
| 166 | let mut chains = Vec::new(); |
| 167 | for chain_text in chain_texts { |
| 168 | chains.push(parse_single_chain(chain_text.trim())?); |
| 169 | } |
| 170 | Ok(chains) |
| 171 | } |
| 172 | |
| 173 | /// Parse a single pattern chain: `(a:Person)-[:KNOWS]->(b:Person)-[:KNOWS]->(c)`. |
| 174 | fn parse_single_chain(text: &str) -> crate::Result<PatternChain> { |
no test coverage detected