HLSL: Implement basic "struct" grammar.

This commit is contained in:
John Kessenich 2016-06-11 16:43:14 -06:00
parent 41ebc42926
commit e6e7494e2a
8 changed files with 257 additions and 6 deletions

View file

@ -54,7 +54,7 @@ class TPpToken;
// Everything needed to fully describe a token.
//
struct HlslToken {
HlslToken() : string(nullptr) { loc.init(); }
HlslToken() : string(nullptr), symbol(nullptr) { loc.init(); }
TSourceLoc loc; // location of token in the source
EHlslTokenClass tokenClass; // what kind of token it is
union { // what data the token holds
@ -64,6 +64,7 @@ struct HlslToken {
bool b;
double d;
};
glslang::TSymbol* symbol; // if a symbol-table lookup was done already, this is the result
};
//