Replacing int by TSourceLoc for lines
Lines should be identified by a TSourceLoc object,
which is currently typedefed to an int, but should
be changed to a struct soon, so making sure the
parser functions can handle the change.
Change-Id: Iaafad862dd1078591757695bf205279e7c4202cf
Reviewed-on: https://swiftshader-review.googlesource.com/3513
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/ParseHelper.cpp b/src/OpenGL/compiler/ParseHelper.cpp
index 7275d7b..22488c9 100644
--- a/src/OpenGL/compiler/ParseHelper.cpp
+++ b/src/OpenGL/compiler/ParseHelper.cpp
@@ -23,7 +23,7 @@
// Look at a '.' field selector string and change it into offsets
// for a vector.
//
-bool TParseContext::parseVectorFields(const TString& compString, int vecSize, TVectorFields& fields, int line)
+bool TParseContext::parseVectorFields(const TString& compString, int vecSize, TVectorFields& fields, const TSourceLoc &line)
{
fields.num = (int) compString.size();
if (fields.num > 4) {
@@ -115,7 +115,7 @@
// Look at a '.' field selector string and change it into offsets
// for a matrix.
//
-bool TParseContext::parseMatrixFields(const TString& compString, int matCols, int matRows, TMatrixFields& fields, int line)
+bool TParseContext::parseMatrixFields(const TString& compString, int matCols, int matRows, TMatrixFields& fields, const TSourceLoc &line)
{
fields.wholeRow = false;
fields.wholeCol = false;
@@ -175,7 +175,7 @@
//
// Used by flex/bison to output all syntax and parsing errors.
//
-void TParseContext::error(TSourceLoc loc,
+void TParseContext::error(const TSourceLoc& loc,
const char* reason, const char* token,
const char* extraInfo)
{
@@ -186,7 +186,7 @@
}
-void TParseContext::warning(TSourceLoc loc,
+void TParseContext::warning(const TSourceLoc& loc,
const char* reason, const char* token,
const char* extraInfo) {
pp::SourceLocation srcLoc;
@@ -203,7 +203,7 @@
//
// Same error message for all places assignments don't work.
//
-void TParseContext::assignError(int line, const char* op, TString left, TString right)
+void TParseContext::assignError(const TSourceLoc &line, const char* op, TString left, TString right)
{
std::stringstream extraInfoStream;
extraInfoStream << "cannot convert from '" << right << "' to '" << left << "'";
@@ -214,7 +214,7 @@
//
// Same error message for all places unary operations don't work.
//
-void TParseContext::unaryOpError(int line, const char* op, TString operand)
+void TParseContext::unaryOpError(const TSourceLoc &line, const char* op, TString operand)
{
std::stringstream extraInfoStream;
extraInfoStream << "no operation '" << op << "' exists that takes an operand of type " << operand
@@ -226,7 +226,7 @@
//
// Same error message for all binary operations don't work.
//
-void TParseContext::binaryOpError(int line, const char* op, TString left, TString right)
+void TParseContext::binaryOpError(const TSourceLoc &line, const char* op, TString left, TString right)
{
std::stringstream extraInfoStream;
extraInfoStream << "no operation '" << op << "' exists that takes a left-hand operand of type '" << left
@@ -235,7 +235,7 @@
error(line, " wrong operand types ", op, extraInfo.c_str());
}
-bool TParseContext::precisionErrorCheck(int line, TPrecision precision, TBasicType type){
+bool TParseContext::precisionErrorCheck(const TSourceLoc &line, TPrecision precision, TBasicType type){
if (!checksPrecisionErrors)
return false;
switch( type ){
@@ -263,7 +263,7 @@
//
// Returns true if the was an error.
//
-bool TParseContext::lValueErrorCheck(int line, const char* op, TIntermTyped* node)
+bool TParseContext::lValueErrorCheck(const TSourceLoc &line, const char* op, TIntermTyped* node)
{
TIntermSymbol* symNode = node->getAsSymbolNode();
TIntermBinary* binaryNode = node->getAsBinaryNode();
@@ -412,7 +412,7 @@
//
// Returns true if the was an error.
//
-bool TParseContext::globalErrorCheck(int line, bool global, const char* token)
+bool TParseContext::globalErrorCheck(const TSourceLoc &line, bool global, const char* token)
{
if (global)
return false;
@@ -431,7 +431,7 @@
//
// Returns true if there was an error.
//
-bool TParseContext::reservedErrorCheck(int line, const TString& identifier)
+bool TParseContext::reservedErrorCheck(const TSourceLoc &line, const TString& identifier)
{
static const char* reservedErrMsg = "reserved built-in name";
if (!symbolTable.atBuiltInLevel()) {
@@ -455,7 +455,7 @@
//
// Returns true if there was an error in construction.
//
-bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction& function, TOperator op, TType* type)
+bool TParseContext::constructorErrorCheck(const TSourceLoc &line, TIntermNode* node, TFunction& function, TOperator op, TType* type)
{
*type = function.getReturnType();
@@ -557,7 +557,7 @@
//
// returns true in case of an error
//
-bool TParseContext::voidErrorCheck(int line, const TString& identifier, const TBasicType& type)
+bool TParseContext::voidErrorCheck(const TSourceLoc &line, const TString& identifier, const TBasicType& type)
{
if(type == EbtVoid) {
error(line, "illegal use of type 'void'", identifier.c_str());
@@ -571,7 +571,7 @@
//
// returns true in case of an error
//
-bool TParseContext::boolErrorCheck(int line, const TIntermTyped* type)
+bool TParseContext::boolErrorCheck(const TSourceLoc &line, const TIntermTyped* type)
{
if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector()) {
error(line, "boolean expression expected", "");
@@ -585,7 +585,7 @@
//
// returns true in case of an error
//
-bool TParseContext::boolErrorCheck(int line, const TPublicType& pType)
+bool TParseContext::boolErrorCheck(const TSourceLoc &line, const TPublicType& pType)
{
if (pType.type != EbtBool || pType.array || (pType.primarySize > 1) || (pType.secondarySize > 1)) {
error(line, "boolean expression expected", "");
@@ -595,7 +595,7 @@
return false;
}
-bool TParseContext::samplerErrorCheck(int line, const TPublicType& pType, const char* reason)
+bool TParseContext::samplerErrorCheck(const TSourceLoc &line, const TPublicType& pType, const char* reason)
{
if (pType.type == EbtStruct) {
if (containsSampler(*pType.userDef)) {
@@ -614,7 +614,7 @@
return false;
}
-bool TParseContext::structQualifierErrorCheck(int line, const TPublicType& pType)
+bool TParseContext::structQualifierErrorCheck(const TSourceLoc &line, const TPublicType& pType)
{
switch(pType.qualifier)
{
@@ -731,7 +731,7 @@
return false;
}
-bool TParseContext::parameterSamplerErrorCheck(int line, TQualifier qualifier, const TType& type)
+bool TParseContext::parameterSamplerErrorCheck(const TSourceLoc &line, TQualifier qualifier, const TType& type)
{
if ((qualifier == EvqOut || qualifier == EvqInOut) &&
type.getBasicType() != EbtStruct && IsSampler(type.getBasicType())) {
@@ -763,7 +763,7 @@
//
// Returns true if there was an error.
//
-bool TParseContext::arraySizeErrorCheck(int line, TIntermTyped* expr, int& size)
+bool TParseContext::arraySizeErrorCheck(const TSourceLoc &line, TIntermTyped* expr, int& size)
{
TIntermConstantUnion* constant = expr->getAsConstantUnion();
@@ -805,7 +805,7 @@
//
// Returns true if there is an error.
//
-bool TParseContext::arrayQualifierErrorCheck(int line, TPublicType type)
+bool TParseContext::arrayQualifierErrorCheck(const TSourceLoc &line, TPublicType type)
{
if ((type.qualifier == EvqAttribute) || (type.qualifier == EvqVertexIn) || (type.qualifier == EvqConstExpr)) {
error(line, "cannot declare arrays of this qualifier", TType(type).getCompleteString().c_str());
@@ -820,7 +820,7 @@
//
// Returns true if there is an error.
//
-bool TParseContext::arrayTypeErrorCheck(int line, TPublicType type)
+bool TParseContext::arrayTypeErrorCheck(const TSourceLoc &line, TPublicType type)
{
//
// Can the type be an array?
@@ -841,7 +841,7 @@
//
// Returns true if there was an error.
//
-bool TParseContext::arrayErrorCheck(int line, TString& identifier, TPublicType type, TVariable*& variable)
+bool TParseContext::arrayErrorCheck(const TSourceLoc &line, TString& identifier, TPublicType type, TVariable*& variable)
{
//
// Don't check for reserved word use until after we know it's not in the symbol table,
@@ -906,7 +906,7 @@
return false;
}
-bool TParseContext::arraySetMaxSize(TIntermSymbol *node, TType* type, int size, bool updateFlag, TSourceLoc line)
+bool TParseContext::arraySetMaxSize(TIntermSymbol *node, TType* type, int size, bool updateFlag, const TSourceLoc &line)
{
bool builtIn = false;
TSymbol* symbol = symbolTable.find(node->getSymbol(), shaderVersion, &builtIn);
@@ -955,7 +955,7 @@
//
// Returns true if there was an error.
//
-bool TParseContext::nonInitConstErrorCheck(int line, TString& identifier, TPublicType& type, bool array)
+bool TParseContext::nonInitConstErrorCheck(const TSourceLoc &line, TString& identifier, TPublicType& type, bool array)
{
if (type.qualifier == EvqConstExpr)
{
@@ -987,7 +987,7 @@
//
// Returns true if there was an error.
//
-bool TParseContext::nonInitErrorCheck(int line, const TString& identifier, TPublicType& type)
+bool TParseContext::nonInitErrorCheck(const TSourceLoc &line, const TString& identifier, TPublicType& type)
{
if(type.qualifier == EvqConstExpr)
{
@@ -1057,7 +1057,7 @@
return true;
}
-bool TParseContext::paramErrorCheck(int line, TQualifier qualifier, TQualifier paramQualifier, TType* type)
+bool TParseContext::paramErrorCheck(const TSourceLoc &line, TQualifier qualifier, TQualifier paramQualifier, TType* type)
{
if (qualifier != EvqConstReadOnly && qualifier != EvqTemporary) {
error(line, "qualifier not allowed on function parameter", getQualifierString(qualifier));
@@ -1076,7 +1076,7 @@
return false;
}
-bool TParseContext::extensionErrorCheck(int line, const TString& extension)
+bool TParseContext::extensionErrorCheck(const TSourceLoc &line, const TString& extension)
{
const TExtensionBehavior& extBehavior = extensionBehavior();
TExtensionBehavior::const_iterator iter = extBehavior.find(extension.c_str());
@@ -1124,14 +1124,14 @@
return (iter != extbehavior.end());
}
-void TParseContext::handleExtensionDirective(int line, const char* extName, const char* behavior)
+void TParseContext::handleExtensionDirective(const TSourceLoc &line, const char* extName, const char* behavior)
{
pp::SourceLocation loc;
DecodeSourceLoc(line, &loc.file, &loc.line);
directiveHandler.handleExtension(loc, extName, behavior);
}
-void TParseContext::handlePragmaDirective(int line, const char* name, const char* value)
+void TParseContext::handlePragmaDirective(const TSourceLoc &line, const char* name, const char* value)
{
pp::SourceLocation loc;
DecodeSourceLoc(line, &loc.file, &loc.line);
@@ -1207,7 +1207,7 @@
//
// Return the function symbol if found, otherwise 0.
//
-const TFunction* TParseContext::findFunction(int line, TFunction* call, bool *builtIn)
+const TFunction* TParseContext::findFunction(const TSourceLoc &line, TFunction* call, bool *builtIn)
{
// First find by unmangled name to check whether the function name has been
// hidden by a variable name or struct typename.
@@ -1233,7 +1233,7 @@
// Initializers show up in several places in the grammar. Have one set of
// code to handle them here.
//
-bool TParseContext::executeInitializer(TSourceLoc line, const TString& identifier, const TPublicType& pType,
+bool TParseContext::executeInitializer(const TSourceLoc& line, const TString& identifier, const TPublicType& pType,
TIntermTyped* initializer, TIntermNode*& intermNode, TVariable* variable)
{
TType type = TType(pType);
@@ -1804,7 +1804,7 @@
//
// Returns 0 for an error or the constructed node (aggregate or typed) for no error.
//
-TIntermTyped* TParseContext::addConstructor(TIntermNode* arguments, const TType* type, TOperator op, TFunction* fnCall, TSourceLoc line)
+TIntermTyped* TParseContext::addConstructor(TIntermNode* arguments, const TType* type, TOperator op, TFunction* fnCall, const TSourceLoc &line)
{
TIntermAggregate *aggregateArguments = arguments->getAsAggregate();
@@ -1871,7 +1871,7 @@
// node or it could be the intermediate tree representation of accessing fields in a constant structure or column of
// a constant matrix.
//
-TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTyped* node, TSourceLoc line)
+TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTyped* node, const TSourceLoc &line)
{
TIntermTyped* typedNode;
TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
@@ -1915,7 +1915,7 @@
// to the function could either be a symbol node (m[0] where m is a constant matrix)that represents a
// constant matrix or it could be the tree representation of the constant matrix (s.m1[0] where s is a constant structure)
//
-TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, TSourceLoc line)
+TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, const TSourceLoc &line)
{
TIntermTyped* typedNode;
TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
@@ -1950,7 +1950,7 @@
// to the function could either be a symbol node (a[0] where a is a constant array)that represents a
// constant array or it could be the tree representation of the constant array (s.a1[0] where s is a constant structure)
//
-TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, TSourceLoc line)
+TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, const TSourceLoc &line)
{
TIntermTyped* typedNode;
TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
@@ -1987,7 +1987,7 @@
// If there is an embedded/nested struct, it appropriately calls addConstStructNested or addConstStructFromAggr
// function and returns the parse-tree with the values of the embedded/nested struct.
//
-TIntermTyped* TParseContext::addConstStruct(const TString& identifier, TIntermTyped* node, TSourceLoc line)
+TIntermTyped* TParseContext::addConstStruct(const TString& identifier, TIntermTyped* node, const TSourceLoc &line)
{
const TFieldList &fields = node->getType().getStruct()->fields();
TIntermTyped *typedNode;
@@ -2743,7 +2743,7 @@
return publicType;
}
-bool TParseContext::enterStructDeclaration(int line, const TString& identifier)
+bool TParseContext::enterStructDeclaration(const TSourceLoc &line, const TString& identifier)
{
++structNestingLevel;
diff --git a/src/OpenGL/compiler/ParseHelper.h b/src/OpenGL/compiler/ParseHelper.h
index b5fd520..1fddbda 100644
--- a/src/OpenGL/compiler/ParseHelper.h
+++ b/src/OpenGL/compiler/ParseHelper.h
@@ -77,9 +77,9 @@
int getShaderVersion() const { return shaderVersion; }
int numErrors() const { return diagnostics.numErrors(); }
TInfoSink& infoSink() { return diagnostics.infoSink(); }
- void error(TSourceLoc loc, const char *reason, const char* token,
+ void error(const TSourceLoc &loc, const char *reason, const char* token,
const char* extraInfo="");
- void warning(TSourceLoc loc, const char* reason, const char* token,
+ void warning(const TSourceLoc &loc, const char* reason, const char* token,
const char* extraInfo="");
void trace(const char* str);
void recover();
@@ -90,53 +90,53 @@
// This method is guaranteed to succeed, even if no variable with 'name' exists.
const TVariable *getNamedVariable(const TSourceLoc &location, const TString *name, const TSymbol *symbol);
- bool parseVectorFields(const TString&, int vecSize, TVectorFields&, int line);
- bool parseMatrixFields(const TString&, int matCols, int matRows, TMatrixFields&, int line);
+ bool parseVectorFields(const TString&, int vecSize, TVectorFields&, const TSourceLoc &line);
+ bool parseMatrixFields(const TString&, int matCols, int matRows, TMatrixFields&, const TSourceLoc &line);
- bool reservedErrorCheck(int line, const TString& identifier);
- void assignError(int line, const char* op, TString left, TString right);
- void unaryOpError(int line, const char* op, TString operand);
- void binaryOpError(int line, const char* op, TString left, TString right);
- bool precisionErrorCheck(int line, TPrecision precision, TBasicType type);
- bool lValueErrorCheck(int line, const char* op, TIntermTyped*);
+ bool reservedErrorCheck(const TSourceLoc &line, const TString& identifier);
+ void assignError(const TSourceLoc &line, const char* op, TString left, TString right);
+ void unaryOpError(const TSourceLoc &line, const char* op, TString operand);
+ void binaryOpError(const TSourceLoc &line, const char* op, TString left, TString right);
+ bool precisionErrorCheck(const TSourceLoc &line, TPrecision precision, TBasicType type);
+ bool lValueErrorCheck(const TSourceLoc &line, const char* op, TIntermTyped*);
bool constErrorCheck(TIntermTyped* node);
bool integerErrorCheck(TIntermTyped* node, const char* token);
- bool globalErrorCheck(int line, bool global, const char* token);
- bool constructorErrorCheck(int line, TIntermNode*, TFunction&, TOperator, TType*);
- bool arraySizeErrorCheck(int line, TIntermTyped* expr, int& size);
- bool arrayQualifierErrorCheck(int line, TPublicType type);
- bool arrayTypeErrorCheck(int line, TPublicType type);
- bool arrayErrorCheck(int line, TString& identifier, TPublicType type, TVariable*& variable);
- bool voidErrorCheck(int, const TString&, const TBasicType&);
- bool boolErrorCheck(int, const TIntermTyped*);
- bool boolErrorCheck(int, const TPublicType&);
- bool samplerErrorCheck(int line, const TPublicType& pType, const char* reason);
+ bool globalErrorCheck(const TSourceLoc &line, bool global, const char* token);
+ bool constructorErrorCheck(const TSourceLoc &line, TIntermNode*, TFunction&, TOperator, TType*);
+ bool arraySizeErrorCheck(const TSourceLoc &line, TIntermTyped* expr, int& size);
+ bool arrayQualifierErrorCheck(const TSourceLoc &line, TPublicType type);
+ bool arrayTypeErrorCheck(const TSourceLoc &line, TPublicType type);
+ bool arrayErrorCheck(const TSourceLoc &line, TString& identifier, TPublicType type, TVariable*& variable);
+ bool voidErrorCheck(const TSourceLoc&, const TString&, const TBasicType&);
+ bool boolErrorCheck(const TSourceLoc&, const TIntermTyped*);
+ bool boolErrorCheck(const TSourceLoc&, const TPublicType&);
+ bool samplerErrorCheck(const TSourceLoc &line, const TPublicType& pType, const char* reason);
bool locationDeclaratorListCheck(const TSourceLoc &line, const TPublicType &pType);
- bool structQualifierErrorCheck(int line, const TPublicType& pType);
- bool parameterSamplerErrorCheck(int line, TQualifier qualifier, const TType& type);
- bool nonInitConstErrorCheck(int line, TString& identifier, TPublicType& type, bool array);
- bool nonInitErrorCheck(int line, const TString& identifier, TPublicType& type);
- bool paramErrorCheck(int line, TQualifier qualifier, TQualifier paramQualifier, TType* type);
- bool extensionErrorCheck(int line, const TString&);
+ bool structQualifierErrorCheck(const TSourceLoc &line, const TPublicType& pType);
+ bool parameterSamplerErrorCheck(const TSourceLoc &line, TQualifier qualifier, const TType& type);
+ bool nonInitConstErrorCheck(const TSourceLoc &line, TString& identifier, TPublicType& type, bool array);
+ bool nonInitErrorCheck(const TSourceLoc &line, const TString& identifier, TPublicType& type);
+ bool paramErrorCheck(const TSourceLoc &line, TQualifier qualifier, TQualifier paramQualifier, TType* type);
+ bool extensionErrorCheck(const TSourceLoc &line, const TString&);
bool singleDeclarationErrorCheck(const TPublicType &publicType, const TSourceLoc &identifierLocation);
bool layoutLocationErrorCheck(const TSourceLoc& location, const TLayoutQualifier &layoutQualifier);
bool functionCallLValueErrorCheck(const TFunction *fnCandidate, TIntermAggregate *);
const TExtensionBehavior& extensionBehavior() const { return directiveHandler.extensionBehavior(); }
bool supportsExtension(const char* extension);
- void handleExtensionDirective(int line, const char* extName, const char* behavior);
+ void handleExtensionDirective(const TSourceLoc &line, const char* extName, const char* behavior);
const TPragma& pragma() const { return directiveHandler.pragma(); }
- void handlePragmaDirective(int line, const char* name, const char* value);
+ void handlePragmaDirective(const TSourceLoc &line, const char* name, const char* value);
bool containsSampler(TType& type);
bool areAllChildConst(TIntermAggregate* aggrNode);
- const TFunction* findFunction(int line, TFunction* pfnCall, bool *builtIn = 0);
- bool executeInitializer(TSourceLoc line, const TString& identifier, const TPublicType& pType,
+ const TFunction* findFunction(const TSourceLoc &line, TFunction* pfnCall, bool *builtIn = 0);
+ bool executeInitializer(const TSourceLoc &line, const TString& identifier, const TPublicType& pType,
TIntermTyped* initializer, TIntermNode*& intermNode, TVariable* variable = 0);
TPublicType addFullySpecifiedType(TQualifier qualifier, bool invariant, TLayoutQualifier layoutQualifier, const TPublicType &typeSpecifier);
- bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, TSourceLoc);
+ bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, const TSourceLoc&);
TIntermAggregate *parseSingleDeclaration(TPublicType &publicType, const TSourceLoc &identifierOrTypeLocation, const TString &identifier);
TIntermAggregate *parseSingleArrayDeclaration(TPublicType &publicType, const TSourceLoc &identifierLocation, const TString &identifier,
@@ -166,12 +166,12 @@
const TSourceLoc &initLocation, TIntermTyped *initializer);
void parseGlobalLayoutQualifier(const TPublicType &typeQualifier);
- TIntermTyped* addConstructor(TIntermNode*, const TType*, TOperator, TFunction*, TSourceLoc);
+ TIntermTyped* addConstructor(TIntermNode*, const TType*, TOperator, TFunction*, const TSourceLoc&);
TIntermTyped* foldConstConstructor(TIntermAggregate* aggrNode, const TType& type);
- TIntermTyped* addConstVectorNode(TVectorFields&, TIntermTyped*, TSourceLoc);
- TIntermTyped* addConstMatrixNode(int , TIntermTyped*, TSourceLoc);
- TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, TSourceLoc line);
- TIntermTyped* addConstStruct(const TString& , TIntermTyped*, TSourceLoc);
+ TIntermTyped* addConstVectorNode(TVectorFields&, TIntermTyped*, const TSourceLoc&);
+ TIntermTyped* addConstMatrixNode(int, TIntermTyped*, const TSourceLoc&);
+ TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, const TSourceLoc &line);
+ TIntermTyped* addConstStruct(const TString&, TIntermTyped*, const TSourceLoc&);
TIntermTyped *addIndexExpression(TIntermTyped *baseExpression, const TSourceLoc& location, TIntermTyped *indexExpression);
TIntermTyped* addFieldSelectionExpression(TIntermTyped *baseExpression, const TSourceLoc &dotLocation, const TString &fieldString, const TSourceLoc &fieldLocation);
@@ -189,7 +189,7 @@
// Performs an error check for embedded struct declarations.
// Returns true if an error was raised due to the declaration of
// this struct.
- bool enterStructDeclaration(TSourceLoc line, const TString& identifier);
+ bool enterStructDeclaration(const TSourceLoc &line, const TString& identifier);
void exitStructDeclaration();
bool structNestingErrorCheck(const TSourceLoc &line, const TField &field);