slrtbtfs / graphfind-rs

Library for Finding Patterns in graphs
Apache License 2.0
5 stars 0 forks source link

First attempt with macros - [merged] #61

Closed slrtbtfs closed 1 year ago

slrtbtfs commented 1 year ago

Merges macros -> main

First experiments towards #37.

See the tests for how that syntax could be used.

slrtbtfs commented 1 year ago

added 1 commit

Compare with previous version

slrtbtfs commented 1 year ago

requested review from @bjthehun

slrtbtfs commented 1 year ago

In GitLab by @bjthehun on Dec 15, 2022, 10:22

Commented on src/graph_backends/filter_map.rs line 161

We could add more extensive documentation here (i.e. how to invoke this macro, its variants, internal workings, example/doc-tests...)

slrtbtfs commented 1 year ago

In GitLab by @bjthehun on Dec 15, 2022, 10:24

Commented on src/graph_backends/filter_map.rs line 170

At least on my machine & rustc 1.68; match syntax works fine:

match node {
    $node_pattern => Some(node),
    _ => None,
}
slrtbtfs commented 1 year ago

In GitLab by @bjthehun on Dec 15, 2022, 10:32

Commented on src/graph_backends/filter_map.rs line 160

Maybe we could move macros into their own module, i.e. query.

slrtbtfs commented 1 year ago

fixes #37

slrtbtfs commented 1 year ago

added 1 commit

Compare with previous version

slrtbtfs commented 1 year ago

This macro is specific to filter map, so I think we can keep it there for now. That might change if we end up having more macros.

slrtbtfs commented 1 year ago

hm, now it works for me, too.

slrtbtfs commented 1 year ago

In GitLab by @bjthehun on Dec 21, 2022, 10:08

resolved all threads

slrtbtfs commented 1 year ago

In GitLab by @bjthehun on Dec 21, 2022, 10:08

approved this merge request

slrtbtfs commented 1 year ago

In GitLab by @bjthehun on Dec 21, 2022, 10:08

mentioned in commit f617cdbcf6db4139826f579262ca104e55d4ad60