Fixed a bug in do..while - now works
git-svn-id: http://picoc.googlecode.com/svn/trunk@89 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
65db9a490a
commit
2ba0598f1c
3
parse.c
3
parse.c
|
@ -677,6 +677,9 @@ int ParseStatement(struct ParseState *Parser)
|
||||||
if (Parser->Mode == RunModeContinue)
|
if (Parser->Mode == RunModeContinue)
|
||||||
Parser->Mode = RunModeRun;
|
Parser->Mode = RunModeRun;
|
||||||
|
|
||||||
|
if (LexGetToken(Parser, NULL, TRUE) != TokenWhile)
|
||||||
|
ProgramFail(Parser, "'while' expected");
|
||||||
|
|
||||||
Condition = ParseIntExpression(Parser);
|
Condition = ParseIntExpression(Parser);
|
||||||
|
|
||||||
} while (Condition && Parser->Mode == RunModeRun);
|
} while (Condition && Parser->Mode == RunModeRun);
|
||||||
|
|
Loading…
Reference in a new issue