how to fetch the list of necessary bindings in an EEx template or in a AST


Having an EEx template which print some “variables” (i.e. ‘<%= address.street %>, <%= %>’ )
is it possible to fetch all needed bindings? in this case I would like an output like ["address.street", ""]

I guess that there is no such function under EEx modules, but maybe is it possibile starting from the AST?


For whatever it’s worth, there’s a feature like this coming soon in LiveView / HEEx: