Infrastructure: Move nesting counters, etc., to base class.

This lets all languages share the same definitions.
This commit is contained in:
John Kessenich
2017-06-06 19:19:45 -06:00
parent b4d46627cb
commit 9b2531ba23
6 changed files with 33 additions and 32 deletions

View File

@@ -314,17 +314,7 @@ protected:
TIntermSymbol* findLinkageSymbol(TBuiltInVariable biType) const;
// Current state of parsing
struct TPragma contextPragma;
int loopNestingLevel; // 0 if outside all loops
int annotationNestingLevel; // 0 if outside all annotations
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
bool postEntryPointReturn; // 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
bool functionReturnsValue; // true if a non-void function has a return
TBuiltInResource resources;
TLimits& limits;
HlslParseContext(HlslParseContext&);
HlslParseContext& operator=(HlslParseContext&);