_QLButton (etc) should be able to deal with numbered function parameters
Summary: Currently, we pass the context and the bound names that are used, but not $_1
, $_2
, etc. In principle, this is a bug in _QLButton.
Really, this is a bug in QL.serializeContext
-- we should be finding those bindings and handling them. But it's a massive pain in the ass, because those are supposed to resolve lazily, in the context of the usage. So we actually need to fetch and serialize the lexical trees, which is how those really exist.
Basically, this is all crying out for a proper Embeddable typeclass, that can cope with more than just QValues, and is built on top of the .serialize() methods where appropriate.
Note also that this is a PITA to inject into the resulting parser: there is no mechanism for that yet.