mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
rename ParserState::{makeCurPos -> at}
most instances of this being used do not refer to the "current" position, sometimes not even to one reasonably close by. it could also be called `makePos` instead, but `at` seems clear in context.
This commit is contained in:
parent
0076056164
commit
835a6c7bcf
3 changed files with 33 additions and 33 deletions
|
@ -49,7 +49,7 @@ struct ParserState {
|
|||
Formals * validateFormals(Formals * formals, PosIdx pos = noPos, Symbol arg = {});
|
||||
Expr * stripIndentation(const PosIdx pos,
|
||||
std::vector<std::pair<PosIdx, std::variant<Expr *, StringToken>>> && es);
|
||||
PosIdx makeCurPos(const ParserLocation & loc);
|
||||
PosIdx at(const ParserLocation & loc);
|
||||
};
|
||||
|
||||
inline void ParserState::dupAttr(const AttrPath & attrPath, const PosIdx pos, const PosIdx prevPos)
|
||||
|
@ -254,7 +254,7 @@ inline Expr * ParserState::stripIndentation(const PosIdx pos,
|
|||
return new ExprConcatStrings(pos, true, es2);
|
||||
}
|
||||
|
||||
inline PosIdx ParserState::makeCurPos(const ParserLocation & loc)
|
||||
inline PosIdx ParserState::at(const ParserLocation & loc)
|
||||
{
|
||||
return state.positions.add(origin, loc.first_line, loc.first_column);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue