fix parsing typedef usage outside of the actual declaration, don't decrement loop counter
This commit is contained in:
parent
e96fabfe56
commit
e8a2a13595
3
parse.c
3
parse.c
|
@ -123,7 +123,7 @@ struct Value *ParseFunctionDefinition(struct ParseState *Parser,
|
|||
TypeParse(&ParamParser, &ParamType, &ParamIdentifier, NULL);
|
||||
if (ParamType->Base == TypeVoid) {
|
||||
/* this isn't a real parameter at all - delete it */
|
||||
ParamCount--;
|
||||
//ParamCount--;
|
||||
FuncValue->Val->FuncDef.NumParams--;
|
||||
} else {
|
||||
FuncValue->Val->FuncDef.ParamType[ParamCount] = ParamType;
|
||||
|
@ -619,6 +619,7 @@ enum ParseResult ParseStatement(struct ParseState *Parser,
|
|||
if (VarValue->Typ->Base == Type_Type) {
|
||||
*Parser = PreState;
|
||||
ParseDeclaration(Parser, Token);
|
||||
CheckTrailingSemicolon = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue