mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-07-31 01:24:43 +02:00
For errors in config file, report the whole unrecognized token
(and quit right after it) instead of error per char. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@405 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
ada1c093b6
commit
61ac74268c
3
config.l
3
config.l
@ -93,8 +93,9 @@ DEFINE { return TYPE_DEFINE_GAME; }
|
|||||||
|
|
||||||
\n { line++; col = 0; }
|
\n { line++; col = 0; }
|
||||||
|
|
||||||
. {
|
[0-9a-zA-Z_]+ {
|
||||||
fprintf(stderr, "%s:%d:%d unrecognized token \"%s\"\n", config, line, col, yytext);
|
fprintf(stderr, "%s:%d:%d unrecognized token \"%s\"\n", config, line, col, yytext);
|
||||||
|
graceful_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
Loading…
x
Reference in New Issue
Block a user