open-cypher 0.2.0-alpha.1

An unofficial Rust parser for the openCypher query language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use open_cypher::lex;

fn main() {
    let outcome = lex("MATCH (n) WHERE n.score >= 10 RETURN n");

    for token in outcome.tokens {
        println!("{:?} at {:?}", token.kind, token.span);
    }
    for diagnostic in outcome.diagnostics {
        eprintln!("{:?}: {}", diagnostic.code, diagnostic.message);
    }
}