HLSL: Fix #96: Support do-while loop substatements with no curly braces.
This commit is contained in:
@@ -3328,18 +3328,12 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement)
|
||||
case EHTokDo:
|
||||
parseContext.nestLooping();
|
||||
|
||||
if (! acceptTokenClass(EHTokLeftBrace))
|
||||
expected("{");
|
||||
|
||||
// statement
|
||||
if (! peekTokenClass(EHTokRightBrace) && ! acceptScopedStatement(statement)) {
|
||||
if (! acceptScopedStatement(statement)) {
|
||||
expected("do sub-statement");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! acceptTokenClass(EHTokRightBrace))
|
||||
expected("}");
|
||||
|
||||
// WHILE
|
||||
if (! acceptTokenClass(EHTokWhile)) {
|
||||
expected("while");
|
||||
|
||||
Reference in New Issue
Block a user