Skip to main content

Module parser

Module parser 

Source
Expand description

Recursive-descent parser for the Cypher subset. Never panics on any token sequence.

Functions§

is_write_tokens
Return true if the token stream starts with a write keyword, or is a MATCH statement followed by SET or DELETE. Used for fast server-side dispatch without a full parse.
parse
Parse a tokenized Cypher subset query. Every failure is Err(String); this function never panics on a well-formed &[Tok] (including empty / garbage).
parse_write
Parse a tokenized write statement (CREATE / MATCH…SET / MATCH…DELETE / MERGE). Returns Err for read queries or malformed write statements.