mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 14:32:42 +01:00
decouple parser and EvalState
there's no reason the parser itself should be doing semantic analysis like bindVars. split this bit apart (retaining the previous name in EvalState) and have the parser really do *only* parsing, decoupled from EvalState.
This commit is contained in:
parent
e1aa585964
commit
b596cc9e79
4 changed files with 53 additions and 22 deletions
|
|
@ -148,7 +148,7 @@ or { return OR_KW; }
|
|||
} catch (const boost::bad_lexical_cast &) {
|
||||
throw ParseError({
|
||||
.msg = hintfmt("invalid integer '%1%'", yytext),
|
||||
.errPos = state->state.positions[CUR_POS],
|
||||
.errPos = state->positions[CUR_POS],
|
||||
});
|
||||
}
|
||||
return INT_LIT;
|
||||
|
|
@ -158,7 +158,7 @@ or { return OR_KW; }
|
|||
if (errno != 0)
|
||||
throw ParseError({
|
||||
.msg = hintfmt("invalid float '%1%'", yytext),
|
||||
.errPos = state->state.positions[CUR_POS],
|
||||
.errPos = state->positions[CUR_POS],
|
||||
});
|
||||
return FLOAT_LIT;
|
||||
}
|
||||
|
|
@ -287,7 +287,7 @@ or { return OR_KW; }
|
|||
<INPATH_SLASH><<EOF>> {
|
||||
throw ParseError({
|
||||
.msg = hintfmt("path has a trailing slash"),
|
||||
.errPos = state->state.positions[CUR_POS],
|
||||
.errPos = state->positions[CUR_POS],
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue