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:
parent
110d155778
commit
81de12bc8f
4 changed files with 31 additions and 35 deletions
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue