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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user