xo-expression: + Lambda::nested_lambda_map

This commit is contained in:
Roland Conybeare 2024-07-03 16:20:18 -04:00
commit 4b0a2cff2a
5 changed files with 31 additions and 5 deletions

View file

@ -26,7 +26,7 @@ namespace xo {
virtual bool is_global_env() const override { return true; }
virtual binding_path lookup_binding(const std::string & vname) const override {
virtual binding_path lookup_binding(const std::string & /*vname*/) const override {
/* i_link: -1 for global environment
* j_slot: not used
*/

View file

@ -135,6 +135,9 @@ namespace xo {
**/
std::map<std::string, ref::rp<Variable>> layer_var_map_;
/** all lambdas nested once inside this lambda's body **/
std::map<std::string, ref::brw<Lambda>> nested_lambda_map_;
/** established (once) by @ref attach_envs.
*
* @note data dependency on ancestor expressions that don't exist yet

View file

@ -13,8 +13,8 @@ namespace xo {
* providing its location.
**/
struct binding_path {
/** @of parent links to traverse. -1 if global **/
int i_link_ = -1;
/** @of parent links to traverse. -1 if global. -2 if sentinel **/
int i_link_ = -2;
/** for variables bound in some local environment:
* slot# within that environment.
*