Closed rafaelcaricio closed 5 years ago
I've posted a question in Stackoverflow, but just cross-posting here since I could not use the libcypher-parser tag.
libcypher-parser
https://stackoverflow.com/questions/54573401/does-libcypher-parser-has-support-for-regex-operator
An more succinct example here:
echo "RETURN word =~ '.*'" | cypher-lint -a <stdin>:1:14: Invalid input '~': expected NOT, '+', '-', TRUE, FALSE, NULL, "...string...", a float, an integer, '[', a parameter, '{', CASE, FILTER, EXTRACT, REDUCE, ALL, ANY, NONE, SINGLE, shortestPath, allShortestPaths, '(', a function name or an identifier RETURN word =~ '.*' ^ @0 0..20 statement body=@1 @1 0..20 > query clauses=[@2] @2 0..12 > > RETURN projections=[@3] @3 7..12 > > > projection expression=@4 @4 7..11 > > > > identifier `word` @5 12..20 > > error >>=~ '.*'\n<<
I can see references to an CYPHER_OP_REGEX in the code. But cannot find why it's not parsing as expected.
CYPHER_OP_REGEX
Good catch. I've tracked down why it wasn't parsing, adding a test and fixing the issue.
@cleishm Thank you for the quick reply and fix. Great work!
I've posted a question in Stackoverflow, but just cross-posting here since I could not use the
libcypher-parser
tag.https://stackoverflow.com/questions/54573401/does-libcypher-parser-has-support-for-regex-operator
An more succinct example here:
I can see references to an
CYPHER_OP_REGEX
in the code. But cannot find why it's not parsing as expected.