Skip to content

Commit aca5184

Browse files
committed
Extract the Cypher parser into the standalone cypher-parser crate
Move the graph-independent Cypher front-end (lexer, recursive-descent parser, AST, and error type) out of rubydex and depend on the standalone, published `cypher-parser` crate from crates.io. The `rubydex` crate re-exports the modules from `query::cypher`, so the executor, schema, formatting, and tests keep their existing paths unchanged. This separates the language front-end (parse a query string into an AST) from execution against the rubydex graph, and lets the parser be versioned, tested, and reused independently. Parser unit tests live in the cypher-parser crate; rubydex keeps the executor and end-to-end tests.
1 parent 13f37ec commit aca5184

8 files changed

Lines changed: 14 additions & 1106 deletions

File tree

rust/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/rubydex/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ crate-type = ["rlib"]
2222
test_utils = ["dep:tempfile"]
2323

2424
[dependencies]
25+
cypher-parser = "0.1"
2526
ruby-prism = "1.9.0"
2627
ruby-rbs = "0.3"
2728
url = "2.5.4"

rust/rubydex/src/query/cypher/ast.rs

Lines changed: 0 additions & 204 deletions
This file was deleted.

rust/rubydex/src/query/cypher/error.rs

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)