Skip to content

Commit

Permalink
Remove Expr::getPos again
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil committed Dec 5, 2020
1 parent cff6f8f commit c3bbb4d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/libexpr/nixexpr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ struct Expr

virtual Value * maybeThunk(EvalState & state, Env & env);
virtual void setName(Symbol & name);
virtual Pos getPos() { return noPos; };
};

std::ostream & operator << (std::ostream & str, const Expr & e);
Expand Down Expand Up @@ -175,7 +174,6 @@ struct ExprVar : Expr
ExprVar(const Pos & pos, const Symbol & name) : pos(pos), name(name) { };
COMMON_METHODS
Value * maybeThunk(EvalState & state, Env & env);
Pos getPos() { return pos; };
};

struct ExprSelect : Expr
Expand All @@ -186,7 +184,6 @@ struct ExprSelect : Expr
ExprSelect(const Pos & pos, Expr * e, const AttrPath & attrPath, Expr * def) : pos(pos), e(e), def(def), attrPath(attrPath) { };
ExprSelect(const Pos & pos, Expr * e, const Symbol & name) : pos(pos), e(e), def(0) { attrPath.push_back(AttrName(name)); };
COMMON_METHODS
Pos getPos() { return pos; };
};

struct ExprOpHasAttr : Expr
Expand Down Expand Up @@ -236,7 +233,6 @@ struct Formal
Symbol name;
Expr * def;
Formal(const Pos & pos, const Symbol & name, Expr * def) : pos(pos), name(name), def(def) { };
Pos getPos() { return pos; };
};

struct Formals
Expand Down Expand Up @@ -267,7 +263,6 @@ struct ExprLambda : Expr
void setName(Symbol & name);
string showNamePos() const;
COMMON_METHODS
Pos getPos() { return pos; };
};

struct ExprLet : Expr
Expand All @@ -285,7 +280,6 @@ struct ExprWith : Expr
size_t prevWith;
ExprWith(const Pos & pos, Expr * attrs, Expr * body) : pos(pos), attrs(attrs), body(body) { };
COMMON_METHODS
Pos getPos() { return pos; };
};

struct ExprIf : Expr
Expand All @@ -294,7 +288,6 @@ struct ExprIf : Expr
Expr * cond, * then, * else_;
ExprIf(const Pos & pos, Expr * cond, Expr * then, Expr * else_) : pos(pos), cond(cond), then(then), else_(else_) { };
COMMON_METHODS
Pos getPos() { return pos; };
};

struct ExprAssert : Expr
Expand All @@ -303,7 +296,6 @@ struct ExprAssert : Expr
Expr * cond, * body;
ExprAssert(const Pos & pos, Expr * cond, Expr * body) : pos(pos), cond(cond), body(body) { };
COMMON_METHODS
Pos getPos() { return pos; };
};

struct ExprOpNot : Expr
Expand All @@ -329,7 +321,6 @@ struct ExprOpNot : Expr
e1->bindVars(env); e2->bindVars(env); \
} \
void evalWithStrategy(EvalState & state, Env & env, Value & v, EvalStrategy & strat); \
Pos getPos() { return pos; }; \
};

MakeBinOp(ExprApp, "")
Expand All @@ -349,15 +340,13 @@ struct ExprConcatStrings : Expr
ExprConcatStrings(const Pos & pos, bool forceString, vector<Expr *> * es)
: pos(pos), forceString(forceString), es(es) { };
COMMON_METHODS
Pos getPos() { return pos; };
};

struct ExprPos : Expr
{
Pos pos;
ExprPos(const Pos & pos) : pos(pos) { };
COMMON_METHODS
Pos getPos() { return pos; };
};


Expand Down

0 comments on commit c3bbb4d

Please sign in to comment.