Taken from this answer here:
static const qi::rule<std::string::iterator, ast_t()> node =
'{' >> *node >> '}' | +~qi::char_("{}");
Note that a constant var of name node is declared, but node is used to initialize this constant.
What’s going on here?
Helpful “Similar Questions” shows that it is valid in C++ in general, but what does it do in this spirit expression?
It’s a recursive definition, very similar to this example with linked lists. A grammar rule is constructed which refers back to itself. It works because
operator*takes its argument by (const) reference.