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.

(cherry picked from commit 835a6c7bcfd0b22acc16f31de5fc7bb650d52017)
Change-Id: I17cab8a6cc14cac5b64624431957bfcf04140809
This commit is contained in:
eldritch horrors
2024-03-09 00:25:54 -07:00
parent e1cd0077f3
commit f9f8664879
3 changed files with 33 additions and 33 deletions
+2 -2
View File
@@ -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);
}