1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 12:06:01 +01:00

Merge pull request #14416 from lovesegfault/fix-lexer-warn

fix(libexpr/lexer): fix flex warning about default rule
This commit is contained in:
Eelco Dolstra 2025-10-30 17:11:23 +00:00 committed by GitHub
commit 720f693627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -243,6 +243,14 @@ or { return OR_KW; }
return HPATH;
}
<PATH_START>{ANY} |
<PATH_START><<EOF>> {
/* This should be unreachable: PATH_START is only entered after matching
PATH_SEG or HPATH_START, and we rewind to re-parse those same patterns.
This rule exists to satisfy flex's %option nodefault requirement. */
unreachable();
}
{PATH} {
if (yytext[yyleng-1] == '/')
PUSH_STATE(INPATH_SLASH);