HLSL: Fix #96: Support do-while loop substatements with no curly braces.
This commit is contained in:
parent
670271890d
commit
0c6f9360f5
4 changed files with 180 additions and 77 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue