1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 14:53:16 +02:00

libexpr: Rename "column" fields to offset

... because that's what they are.
This commit is contained in:
Robert Hensing 2024-07-11 13:06:39 +02:00
parent 77e9f9ee82
commit 71cb8bf509
4 changed files with 21 additions and 21 deletions

View file

@ -22,20 +22,20 @@ struct StringToken
struct ParserLocation
{
int first_column;
int last_column;
int beginOffset;
int endOffset;
// backup to recover from yyless(0)
int stashed_first_column, stashed_last_column;
int stashedBeginOffset, stashedEndOffset;
void stash() {
stashed_first_column = first_column;
stashed_last_column = last_column;
stashedBeginOffset = beginOffset;
stashedEndOffset = endOffset;
}
void unstash() {
first_column = stashed_first_column;
last_column = stashed_last_column;
beginOffset = stashedBeginOffset;
endOffset = stashedEndOffset;
}
/** Latest doc comment position, or 0. */
@ -308,12 +308,12 @@ inline Expr * ParserState::stripIndentation(const PosIdx pos,
inline PosIdx LexerState::at(const ParserLocation & loc)
{
return positions.add(origin, loc.first_column);
return positions.add(origin, loc.beginOffset);
}
inline PosIdx ParserState::at(const ParserLocation & loc)
{
return positions.add(origin, loc.first_column);
return positions.add(origin, loc.beginOffset);
}
}