]> git.notmuchmail.org Git - notmuch/commit
lib/parse-sexp: apply macros
authorDavid Bremner <david@tethera.net>
Tue, 24 Aug 2021 15:17:41 +0000 (08:17 -0700)
committerDavid Bremner <david@tethera.net>
Sun, 5 Sep 2021 00:07:19 +0000 (17:07 -0700)
commit551254eb76c9bb558078f04f21df1f6089cb03d6
tree4c2e99bf8a1e387d1b7ac4f1943410c3f22a844f
parent3eca7fcf10a63e642e627539442271872fca58fd
lib/parse-sexp: apply macros

Macros implement lazy evaluation and lexical scope.  The former is
needed to make certain natural constructs work sensibly (e.g. (tag
,param)) but the latter is mainly future-proofing in case the DSL is
is extended to allow local bindings.

For technical background, see chapters 6 and 17 of [1] (or some other
intermediate programming languages textbook).

[1] http://cs.brown.edu/courses/cs173/2012/book/
doc/man7/notmuch-sexp-queries.rst
lib/parse-sexp.cc
test/T081-sexpr-search.sh