Lines Matching refs:line
51 bool TParseContext::parseVectorFields(const TString& compString, int vecSize, TVectorFields& fields, int line)
55 error(line, "illegal vector field selection", compString.c_str(), "");
117 error(line, "illegal vector field selection", compString.c_str(), "");
124 error(line, "vector field selection out of range", compString.c_str(), "");
130 error(line, "illegal - vector component fields not from the same set", compString.c_str(), "");
144 bool TParseContext::parseMatrixFields(const TString& compString, int matSize, TMatrixFields& fields, int line)
152 error(line, "illegal length of matrix field selection", compString.c_str(), "");
158 error(line, "illegal matrix field selection", compString.c_str(), "");
165 error(line, "illegal matrix field selection", compString.c_str(), "");
173 error(line, "illegal matrix field selection", compString.c_str(), "");
181 error(line, "matrix field selection out of range", compString.c_str(), "");
236 void TParseContext::assignError(int line, const char* op, TString left, TString right)
238 error(line, "", op, "cannot convert from '%s' to '%s'",
245 void TParseContext::unaryOpError(int line, const char* op, TString operand)
247 error(line, " wrong operand type", op,
255 void TParseContext::binaryOpError(int line, const char* op, TString left, TString right)
257 error(line, " wrong operand types ", op,
263 bool TParseContext::precisionErrorCheck(int line, TPrecision precision, TBasicType type){
267 error( line, "No precision specified for (float)", "", "" );
273 error( line, "No precision specified (int)", "", "" );
287 bool TParseContext::lValueErrorCheck(int line, const char* op, TIntermTyped* node)
299 return lValueErrorCheck(line, op, binaryNode->getLeft());
301 errorReturn = lValueErrorCheck(line, op, binaryNode->getLeft());
313 error(line, " l-value of swizzle cannot have duplicate components", op, "", "");
324 error(line, " l-value required", op, "", "");
364 error(line, " l-value required", op, "", "");
380 error(line, " l-value required", op, "\"%s\" (%s)", symbol, message);
382 error(line, " l-value required", op, "(%s)", message);
425 bool TParseContext::globalErrorCheck(int line, bool global, const char* token)
430 error(line, "only allowed at global scope", token, "");
444 bool TParseContext::reservedErrorCheck(int line, const TString& identifier)
449 error(line, reservedErrMsg, "gl_", "");
454 error(line, reservedErrMsg, "webgl_", "");
458 error(line, reservedErrMsg, "_webgl_", "");
463 //error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", "");
465 infoSink.info.message(EPrefixWarning, "Two consecutive underscores are reserved for future use.", line);
480 bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction& function, TOperator op, TType* type)
527 error(line, "array constructor needs one argument per array element", "constructor", "");
532 error(line, "constructing from a non-dereferenced array", "constructor", "");
538 error(line, "constructing matrix from matrix can only take one argument", "constructor", "");
544 error(line, "too many arguments", "constructor", "");
549 error(line, "Number of constructor parameters does not match the number of structure fields", "constructor", "");
556 error(line, "not enough data provided for construction", "constructor", "");
563 error(line, "constructor argument does not have a type", "constructor", "");
567 error(line, "cannot convert a sampler", "constructor", "");
571 error(line, "cannot convert a void", "constructor", "");
582 bool TParseContext::voidErrorCheck(int line, const TString& identifier, const TPublicType& pubType)
585 error(line, "illegal use of type 'void'", identifier.c_str(), "");
596 bool TParseContext::boolErrorCheck(int line, const TIntermTyped* type)
599 error(line, "boolean expression expected", "", "");
610 bool TParseContext::boolErrorCheck(int line, const TPublicType& pType)
613 error(line, "boolean expression expected", "", "");
620 bool TParseContext::samplerErrorCheck(int line, const TPublicType& pType, const char* reason)
624 error(line, reason, getBasicString(pType.type), "(structure contains a sampler)");
631 error(line, reason, getBasicString(pType.type), "");
639 bool TParseContext::structQualifierErrorCheck(int line, const TPublicType& pType)
643 error(line, "cannot be used with a structure", getQualifierString(pType.qualifier), "");
648 if (pType.qualifier != EvqUniform && samplerErrorCheck(line, pType, "samplers must be uniform"))
654 bool TParseContext::parameterSamplerErrorCheck(int line, TQualifier qualifier, const TType& type)
658 error(line, "samplers cannot be output parameters", type.getBasicString(), "");
686 bool TParseContext::arraySizeErrorCheck(int line, TIntermTyped* expr, int& size)
690 error(line, "array size must be a constant integer expression", "", "");
697 error(line, "array size must be a positive integer", "", "");
710 bool TParseContext::arrayQualifierErrorCheck(int line, TPublicType type)
713 error(line, "cannot declare arrays of this qualifier", TType(type).getCompleteString().c_str(), "");
725 bool TParseContext::arrayTypeErrorCheck(int line, TPublicType type)
731 error(line, "cannot declare arrays of arrays", TType(type).getCompleteString().c_str(), "");
746 bool TParseContext::arrayErrorCheck(int line, TString& identifier, TPublicType type, TVariable*& variable)
757 if (reservedErrorCheck(line, identifier))
767 error(line, "INTERNAL ERROR inserting new symbol", identifier.c_str(), "");
772 error(line, "variable expected", identifier.c_str(), "");
778 error(line, "redeclaring non-array as array", identifier.c_str(), "");
782 error(line, "redeclaration of array with size", identifier.c_str(), "");
787 error(line, "redeclaration of array with a different type", identifier.c_str(), "");
794 error(line, "higher index value already used for the array", identifier.c_str(), "");
805 if (voidErrorCheck(line, identifier, type))
811 bool TParseContext::arraySetMaxSize(TIntermSymbol *node, TType* type, int size, bool updateFlag, TSourceLoc line)
816 error(line, " undeclared identifier", node->getSymbol().c_str(), "");
829 infoSink.info.message(EPrefixInternalError, "gl_MaxDrawBuffers not defined", line);
835 error(line, "", "[", "gl_FragData can only have a max array size of up to gl_MaxDrawBuffers", "");
863 bool TParseContext::nonInitConstErrorCheck(int line, TString& identifier, TPublicType& type)
870 error(line, "variables with qualifier 'const' must be initialized", identifier.c_str(), "");
883 bool TParseContext::nonInitErrorCheck(int line, TString& identifier, TPublicType& type)
885 if (reservedErrorCheck(line, identifier))
891 error(line, "redefinition", variable->getName().c_str(), "");
896 if (voidErrorCheck(line, identifier, type))
902 bool TParseContext::paramErrorCheck(int line, TQualifier qualifier, TQualifier paramQualifier, TType* type)
905 error(line, "qualifier not allowed on function parameter", getQualifierString(qualifier), "");
909 error(line, "qualifier not allowed with ", getQualifierString(qualifier), getQualifierString(paramQualifier));
921 bool TParseContext::extensionErrorCheck(int line, const TString& extension)
925 error(line, "extension", extension.c_str(), "is not supported");
929 error(line, "extension", extension.c_str(), "is disabled");
934 infoSink.info.message(EPrefixWarning, msg.c_str(), line);
952 const TFunction* TParseContext::findFunction(int line, TFunction* call, bool *builtIn)
962 error(line, "no matching overloaded function found", call->getName().c_str(), "");
967 error(line, "function name expected", call->getName().c_str(), "");
978 bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPublicType& pType,
984 if (reservedErrorCheck(line, identifier))
987 if (voidErrorCheck(line, identifier, pType))
995 error(line, "redefinition", variable->getName().c_str(), "");
1007 error(line, " cannot initialize this type of qualifier ", variable->getType().getQualifierString(), "");
1016 error(line, " assigning non-constant to", "=", "'%s'", variable->getType().getCompleteString().c_str());
1021 error(line, " non-matching types for const initializer ",
1041 error(line, " cannot assign to", "=", "'%s'", variable->getType().getCompleteString().c_str());
1048 TIntermSymbol* intermSymbol = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), line);
1049 line);
1051 assignError(line, "=", intermSymbol->getCompleteString(), initializer->getCompleteString());
1084 TIntermTyped* TParseContext::addConstructor(TIntermNode* node, const TType* type, TOperator op, TFunction* fnCall, TSourceLoc line)
1155 TIntermTyped* constructor = intermediate.setAggregateOperator(aggrNode, op, line);
1192 TIntermTyped* TParseContext::constructBuiltIn(const TType* type, TOperator op, TIntermNode* node, TSourceLoc line, bool subset)
1226 error(line, "unsupported construction", "", "");
1233 error(line, "can't convert", "constructor", "");
1246 return intermediate.setAggregateOperator(newNode, op, line);
1254 TIntermTyped* TParseContext::constructStruct(TIntermNode* node, TType* type, int paramCount, TSourceLoc line, bool subset)
1260 return intermediate.setAggregateOperator(node->getAsTyped(), EOpConstructStruct, line);
1262 error(line, "", "constructor", "cannot convert parameter %d from '%s' to '%s'", paramCount,
1277 TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTyped* node, TSourceLoc line)
1287 infoSink.info.message(EPrefixInternalError, "ConstantUnion not initialized in addConstVectorNode function", line);
1293 error(line, "Cannot offset into the vector", "Error", "");
1303 error(line, "", "[", "vector field selection out of range '%d'", fields.offsets[i]);
1311 typedNode = intermediate.addConstantUnion(constArray, node->getType(), line);
1321 TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, TSourceLoc line)
1327 error(line, "", "[", "matrix field selection out of range '%d'", index);
1335 typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), line);
1337 error(line, "Cannot offset into the matrix", "Error", "");
1353 TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, TSourceLoc line)
1361 error(line, "", "[", "array field selection out of range '%d'", index);
1370 typedNode = intermediate.addConstantUnion(&unionArray[arrayElementSize * index], tempConstantNode->getType(), line);
1372 error(line, "Cannot offset into the array", "Error", "");
1387 TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* node, TSourceLoc line)
1406 typedNode = intermediate.addConstantUnion(constArray+instanceSize, tempConstantNode->getType(), line); // type will be changed in the calling function
1408 error(line, "Cannot offset into the structure", "Error", "");