Handle a missing -P/--preinclude file the same as an INCLUDE (#1873)

This commit is contained in:
Rangi
2025-12-08 14:39:34 -05:00
committed by GitHub
parent 33475e2c36
commit b0e0dfc56e
25 changed files with 83 additions and 31 deletions
+2 -5
View File
@@ -558,11 +558,8 @@ int main(int argc, char *argv[]) {
charmap_New(DEFAULT_CHARMAP_NAME, nullptr);
// Init lexer and file stack, providing file info
fstk_Init(*localOptions.inputFileName);
// Perform parse (`yy::parser` is auto-generated from `parser.y`)
if (yy::parser parser; parser.parse() != 0) {
// Init lexer and file stack, and parse (`yy::parser` is auto-generated from `parser.y`)
if (yy::parser parser; fstk_Init(*localOptions.inputFileName) && parser.parse() != 0) {
// Exited due to YYABORT or YYNOMEM
fatal("Unrecoverable error while parsing"); // LCOV_EXCL_LINE
}