open_cypher/
lib.rs

1extern crate pest;
2extern crate pest_derive;
3
4use pest::Parser;
5use pest::error::Error;
6use pest::iterators::Pairs;
7use pest_derive::Parser;
8
9#[derive(Parser)]
10#[grammar = "cypher.pest"]
11pub struct CypherParser;
12
13pub fn parse(code: &str) -> Result<Pairs<Rule>, Error<Rule>> {
14    CypherParser::parse(Rule::Cypher, code)
15}