X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fcontext.c;h=cbcfbc6b1d6ecd6e32ab0a2a099cf557cad958f1;hb=93b5629631b3bfdbb9f06a9036f85f1caf370466;hp=05d5aacbfc3d1d041957d88b72df257ee35e47f5;hpb=ea0162a1698563a49de50456cd3f2cc18b83a05e;p=m6w6%2Fext-psi diff --git a/src/context.c b/src/context.c index 05d5aac..cbcfbc6 100644 --- a/src/context.c +++ b/src/context.c @@ -960,9 +960,13 @@ void PSI_ContextBuild(PSI_Context *C, const char *paths) continue; } - while (-1 != PSI_ParserScan(&P)) { + while (0 < PSI_ParserScan(&P)) { PSI_ParserParse(&P, PSI_TokenAlloc(&P)); - }; + if (P.num == PSI_T_EOF) { + break; + } + } + PSI_ParserParse(&P, NULL); PSI_ContextValidate(C, &P); PSI_ParserDtor(&P);