Parse until the end of the file even upon errors
This commit is contained in:
parent
72a75f666e
commit
ec8acd14af
@ -189,9 +189,11 @@ static int _translation_unit(C99 * c99)
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "DEBUG: %s()\n", __func__);
|
fprintf(stderr, "DEBUG: %s()\n", __func__);
|
||||||
#endif
|
#endif
|
||||||
while((ret |= c99_scan(c99)) == 0
|
while(c99_scan(c99) == 0
|
||||||
&& c99->token != NULL) /* end of file */
|
&& c99->token != NULL) /* end of file */
|
||||||
ret |= _external_declaration(c99);
|
ret |= _external_declaration(c99);
|
||||||
|
if(c99->token != NULL)
|
||||||
|
ret |= 1;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user