for (profileLength = 0; profileLength < maxProfileLength; ++profileLength) {
if (c < 0 || c == ' ' || c == '\t' || c == '\n' || c == '\r')
break;
- profileString[profileLength] = c;
+ profileString[profileLength] = (char)c;
c = get();
}
if (c > 0 && c != ' ' && c != '\t' && c != '\n' && c != '\r') {
explicit TParserToken(YYSTYPE& b) : sType(b) { }
YYSTYPE& sType;
+protected:
+ TParserToken(TParserToken&);
+ TParserToken& operator=(TParserToken&);
};
} // end namespace glslang
ReservedSet->insert("using");
}
+void TScanContext::deleteKeywordMap()
+{
+ delete KeywordMap;
+ KeywordMap = 0;
+ delete ReservedSet;
+ ReservedSet = 0;
+}
+
int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
{
do {
default:
char buf[2];
- buf[0] = ppToken.token;
+ buf[0] = (char)ppToken.token;
buf[1] = 0;
parseContext.error(loc, "unexpected token", buf, "");
break;
return keyword;
case LAYOUT:
+ {
+ const int numLayoutExts = 2;
+ const char* layoutExts[numLayoutExts] = { GL_ARB_shading_language_420pack,
+ GL_ARB_explicit_attrib_location };
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140 &&
- ! parseContext.extensionsTurnedOn(1, &GL_ARB_shading_language_420pack)))
+ ! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)))
return identifierOrType();
return keyword;
-
+ }
case SHARED:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140))