PP: Recognize the '::' token, and translate appropriately to GLSL/HLSL token.
This commit is contained in:
parent
6212e86faa
commit
523e20dc02
8 changed files with 26 additions and 3 deletions
|
|
@ -2,5 +2,5 @@
|
|||
// For the version, it uses the latest git tag followed by the number of commits.
|
||||
// For the date, it uses the current date (when then script is run).
|
||||
|
||||
#define GLSLANG_REVISION "Overload400-PrecQual.1892"
|
||||
#define GLSLANG_DATE "09-Mar-2017"
|
||||
#define GLSLANG_REVISION "Overload400-PrecQual.1897"
|
||||
#define GLSLANG_DATE "10-Mar-2017"
|
||||
|
|
|
|||
|
|
@ -701,6 +701,10 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
|
|||
case PpAtomDecrement: return DEC_OP;
|
||||
case PpAtomIncrement: return INC_OP;
|
||||
|
||||
case PpAtomColonColon:
|
||||
parseContext.error(loc, "not supported", "::", "");
|
||||
break;
|
||||
|
||||
case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT;
|
||||
case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT;
|
||||
case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT;
|
||||
|
|
|
|||
|
|
@ -120,6 +120,8 @@ const struct {
|
|||
{ PpAtomDecrement, "--" },
|
||||
{ PpAtomIncrement, "++" },
|
||||
|
||||
{ PpAtomColonColon, "::" },
|
||||
|
||||
{ PpAtomDefine, "define" },
|
||||
{ PpAtomUndef, "undef" },
|
||||
{ PpAtomIf, "if" },
|
||||
|
|
|
|||
|
|
@ -691,6 +691,12 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
pp->parseContext.ppError(ppToken->loc, "End of line in string", "string", "");
|
||||
}
|
||||
return PpAtomConstString;
|
||||
case ':':
|
||||
ch = getch();
|
||||
if (ch == ':')
|
||||
return PpAtomColonColon;
|
||||
ungetch();
|
||||
return ':';
|
||||
}
|
||||
|
||||
ch = getch();
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@ enum EFixedAtoms {
|
|||
PpAtomDecrement,
|
||||
PpAtomIncrement,
|
||||
|
||||
PpAtomColonColon,
|
||||
|
||||
PpAtomPaste,
|
||||
|
||||
// Constants
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue