Fork me on GitHub
#datascript
<
2016-07-24
>
Niki08:07:53

@stathissideris: 1) I haven’t worked on this for a while

Niki08:07:14

2) can you paste your query?

stathissideris08:07:34

@tonsky: I’m using datascript to analyze clojure code, so it’s a rule for matching macros that I’m trying to make:

stathissideris08:07:46

[(macro ?def ?name)
 (top-level-fn-or-macro ?def ?name)
 (?do :statements ?def)
 (?do :op :do)
 (?do :statements ?set-macro)
 (?set-macro :op :instance-call)
 ;;(?set-macro :method 'setMethod) ;;TODO not possible with symbols
 ;;TODO also match order when available
 (?do :ret ?ret)
 (?ret :op :the-var)]

stathissideris08:07:29

it works as is, but i’d like it to be more specific

stathissideris08:07:42

i.e. to include the commented-out part

stathissideris08:07:00

it sort of works, but the lack of not and not being able to match symbols are a bit limiting

Niki12:07:47

can you open an issue about having a symbol there? probably bug in a parser

stathissideris14:07:32

@tonsky: ok, thanks, I’ll try and make a minimal example that demonstrates the problem

stathissideris14:07:14

@tonsky: do you think implementing not would be hard for someone very competent with clojure but new to datascript? I’m considering giving it a try