change while-loop to create new scope for loop body, per spec
authorBrian <brian@yutani.localnet.net>
Fri, 19 Jan 2007 17:02:58 +0000 (10:02 -0700)
committerBrian <brian@yutani.localnet.net>
Fri, 19 Jan 2007 17:02:58 +0000 (10:02 -0700)
src/mesa/shader/slang/library/slang_shader.syn
src/mesa/shader/slang/library/slang_shader_syn.h

index ee0254f1b80b63c8a158ddab229e351a8fa53043..bfa6793f0679e08f4f81c9a2a42322f4eaaad0f3 100644 (file)
@@ -1096,7 +1096,7 @@ condition_3
     expression .and .true .emit OP_END;
 
 /*
-    <iteration_statement>               ::= "while" "(" <condition> ")" <statement_no_new_scope>
+    <iteration_statement>               ::= "while" "(" <condition> ")" <statement>
                                           | "do" <statement> "while" "(" <expression> ")" ";"
                                           | "for" "(" <for_init_statement> <for_rest_statement> ")"
                                             <statement_no_new_scope>
@@ -1105,7 +1105,7 @@ iteration_statement
     iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;
 iteration_statement_1
     "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and
-    rparen .error RPAREN_EXPECTED .and statement_no_new_scope;
+    rparen .error RPAREN_EXPECTED .and statement;
 iteration_statement_2
     "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and
     expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;
index abfb6cd42a87e1f45da9224504456705c6b644ce..58cf1b139048cfcf61cef6cfca0b757d1de38a36 100644 (file)
 " iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n"
 "iteration_statement_1\n"
 " \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n"
-" rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n"
+" rparen .error RPAREN_EXPECTED .and statement;\n"
 "iteration_statement_2\n"
 " \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n"
 " expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n"