Add switch/case/default statements, using a switch node that contains a sequence of case/default nodes and top-level nodes of the code chunks in between them.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21131 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
8e5425745f
commit
0576126005
10 changed files with 244 additions and 23 deletions
|
|
@ -71,6 +71,13 @@ bool RemoveSelection(bool /*preVisit*/ , TIntermSelection* node, TIntermTravers
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RemoveSwitch(bool /*preVisit*/ , TIntermSwitch* node, TIntermTraverser*)
|
||||
{
|
||||
delete node;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void RemoveConstantUnion(TIntermConstantUnion* node, TIntermTraverser*)
|
||||
{
|
||||
delete node;
|
||||
|
|
@ -89,6 +96,7 @@ void RemoveAllTreeNodes(TIntermNode* root)
|
|||
it.visitSelection = RemoveSelection;
|
||||
it.visitSymbol = RemoveSymbol;
|
||||
it.visitUnary = RemoveUnary;
|
||||
it.visitSwitch = RemoveSwitch;
|
||||
|
||||
it.preVisit = false;
|
||||
it.postVisit = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue