Re-allow non-language characters in ES 100 comments, including '\', except for '\' just before a new line.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24331 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-12-04 17:23:03 +00:00
parent 34bd4fbef7
commit e1f0f5b31f
11 changed files with 56 additions and 91 deletions

View file

@ -1413,28 +1413,6 @@ void TParseContext::lineContinuationCheck(TSourceLoc loc)
}
}
//
// See if this version/profile allows use the given character in a comment.
//
void TParseContext::commentCharacterCheck(TSourceLoc loc, int ch)
{
if ((profile == EEsProfile && version >= 300) ||
(profile != EEsProfile))
return;
TString message("non-language character (");
if (ch > 32 && ch <= 126)
message.push_back(ch);
message.append(") in comment");
if (messages & EShMsgRelaxedErrors) {
warn(loc, "not allowed in this version", message.c_str(), "");
} else {
requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, message.c_str());
profileRequires(loc, EEsProfile, 300, 0, message.c_str());
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 420, 0, message.c_str());
}
}
bool TParseContext::builtInName(const TString& identifier)
{
return identifier.compare(0, 3, "gl_") == 0;