Cesium
Cesium copied to clipboard
Better parser error reporting
int test() {
return 1;
}
int main(void) {
if (!test()) return -3;
return 0; }
Produces Excessive output after the end of a translation unit at line 5, column 10: KeywordInt int.
If I comment out if (!test()) return -3;
then things starts working.
Okay, I figure out while I wrote this, we lack of support for !
operator for conditions, but I think we should do something about better user reporting.
We couldn't parse anything beyond that int
. I doubt we'll get anything better from an auto-generated parser.
I'm leaving this open for any ideas, though. Maybe one day we'll rewrite the parser and get better error messages.
For now, this isn't a priority for me, as our primary target is already written C programs.