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);
|
TypeParse(&ParamParser, &ParamType, &ParamIdentifier, NULL);
|
||||||
if (ParamType->Base == TypeVoid) {
|
if (ParamType->Base == TypeVoid) {
|
||||||
/* this isn't a real parameter at all - delete it */
|
/* this isn't a real parameter at all - delete it */
|
||||||
ParamCount--;
|
//ParamCount--;
|
||||||
FuncValue->Val->FuncDef.NumParams--;
|
FuncValue->Val->FuncDef.NumParams--;
|
||||||
} else {
|
} else {
|
||||||
FuncValue->Val->FuncDef.ParamType[ParamCount] = ParamType;
|
FuncValue->Val->FuncDef.ParamType[ParamCount] = ParamType;
|
||||||
|
@ -619,6 +619,7 @@ enum ParseResult ParseStatement(struct ParseState *Parser,
|
||||||
if (VarValue->Typ->Base == Type_Type) {
|
if (VarValue->Typ->Base == Type_Type) {
|
||||||
*Parser = PreState;
|
*Parser = PreState;
|
||||||
ParseDeclaration(Parser, Token);
|
ParseDeclaration(Parser, Token);
|
||||||
|
CheckTrailingSemicolon = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue