1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 13:06:01 +01: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

@ -36,13 +36,13 @@
do \
if (N) \
{ \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
(Current).beginOffset = YYRHSLOC (Rhs, 1).beginOffset; \
(Current).endOffset = YYRHSLOC (Rhs, N).endOffset; \
} \
else \
{ \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
(Current).beginOffset = (Current).endOffset = \
YYRHSLOC (Rhs, 0).endOffset; \
} \
while (0)
@ -83,7 +83,7 @@ using namespace nix;
void yyerror(YYLTYPE * loc, yyscan_t scanner, ParserState * state, const char * error)
{
if (std::string_view(error).starts_with("syntax error, unexpected end of file")) {
loc->first_column = loc->last_column;
loc->beginOffset = loc->endOffset;
}
throw ParseError({
.msg = HintFmt(error),