Closed zoren closed 2 years ago
Interesting to note that "Cannot parse rule-expr arguments"
in parse-rule-expr
can no longer be hit as arguments are either variables, placeholders or constants.
Hi @zoren. Thanks for improving the datalog-parser! Would you want to increment the patch-version in project.clj? Then we can release a new version right away.
Sure, done!
This is a port of: https://github.com/tonsky/datascript/pull/417
This PR allows using symbols(not starting with
?
) as constants in data patterns. This is consistent with Datomic's behaviour.Notes:
I changed the order of parsers in
parse-fn-arg
otherwise$x
would parse as a constant, and it shouldn't for function arguments.I believe the unit test saying
(friends something)
should throw is wrong. I've changed it to a positive test wheresomething
parses as a constant argument instead.