mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
Cleanup
This commit is contained in:
parent
e8fbae4b3e
commit
0ecfe18f49
1 changed files with 9 additions and 7 deletions
16
parser.cpp
16
parser.cpp
|
@ -1178,10 +1178,10 @@ static bool parser_close_call(parser_t *parser, shunt *sy)
|
||||||
sy->argc.pop_back();
|
sy->argc.pop_back();
|
||||||
|
|
||||||
if (sy->out.size() < fid) {
|
if (sy->out.size() < fid) {
|
||||||
parseerror(parser, "internal error: broken function call%lu < %lu+%lu\n",
|
parseerror(parser, "internal error: broken function call %zu < %zu+%zu\n",
|
||||||
(unsigned long)sy->out.size(),
|
sy->out.size(),
|
||||||
(unsigned long)fid,
|
fid,
|
||||||
(unsigned long)paramcount);
|
paramcount);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1256,8 +1256,10 @@ static bool parser_close_call(parser_t *parser, shunt *sy)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (fid+1 + paramcount != sy->out.size()) {
|
if (fid+1 + paramcount != sy->out.size()) {
|
||||||
parseerror(parser, "internal error: parameter count mismatch: (%lu+1+%lu), %lu",
|
parseerror(parser, "internal error: parameter count mismatch: (%zu+1+%zu), %zu",
|
||||||
(unsigned long)fid, (unsigned long)paramcount, (unsigned long)sy->out.size());
|
fid,
|
||||||
|
paramcount,
|
||||||
|
sy->out.size());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1924,7 +1926,7 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
|
||||||
} else
|
} else
|
||||||
expr = sy.out[0].out;
|
expr = sy.out[0].out;
|
||||||
if (sy.paren.size()) {
|
if (sy.paren.size()) {
|
||||||
parseerror(parser, "internal error: vec_size(sy.paren) = %lu", (unsigned long)sy.paren.size());
|
parseerror(parser, "internal error: sy.paren.size() = %zu", sy.paren.size());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return expr;
|
return expr;
|
||||||
|
|
Loading…
Reference in a new issue