HLSL: Implement switch/case/default.
This commit is contained in:
@@ -147,6 +147,9 @@ public:
|
||||
void pushScope() { symbolTable.push(); }
|
||||
void popScope() { symbolTable.pop(0); }
|
||||
|
||||
void pushSwitchSequence(TIntermSequence* sequence) { switchSequenceStack.push_back(sequence); }
|
||||
void popSwitchSequence() { switchSequenceStack.pop_back(); }
|
||||
|
||||
protected:
|
||||
void inheritGlobalDefaults(TQualifier& dst) const;
|
||||
TVariable* makeInternalVariable(const char* name, const TType&) const;
|
||||
@@ -166,7 +169,6 @@ protected:
|
||||
int structNestingLevel; // 0 if outside blocks and structures
|
||||
int controlFlowNestingLevel; // 0 if outside all flow control
|
||||
TList<TIntermSequence*> switchSequenceStack; // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting
|
||||
TList<int> switchLevel; // the statementNestingLevel the current switch statement is at, which must match the level of its case statements
|
||||
bool inEntrypoint; // if inside a function, true if the function is the entry point
|
||||
bool postMainReturn; // if inside a function, true if the function is the entry point and this is after a return statement
|
||||
const TType* currentFunctionType; // the return type of the function that's currently being parsed
|
||||
|
||||
Reference in New Issue
Block a user