1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 23:11:16 +02:00

* Refactoring: move variable uses to a separate class.

This commit is contained in:
Eelco Dolstra 2010-04-14 15:14:23 +00:00
parent 110d155778
commit 81de12bc8f
4 changed files with 31 additions and 35 deletions

View file

@ -78,7 +78,7 @@ struct ExprPath : Expr
COMMON_METHODS
};
struct ExprVar : Expr
struct VarRef
{
Symbol name;
@ -94,8 +94,15 @@ struct ExprVar : Expr
levels up from the current one.*/
unsigned int level;
unsigned int displ;
ExprVar(const Symbol & name) : name(name) { };
VarRef(const Symbol & name) : name(name) { };
void bind(const StaticEnv & env);
};
struct ExprVar : Expr
{
VarRef info;
ExprVar(const Symbol & name) : info(name) { };
COMMON_METHODS
};