Refactor TParseContext into 3 level inheritance.
Adds parseVersions.h as the base TParseVersions for versioning, and splits the remainder between TParseContextBase (sharable across parsers) and TParseContext (now the GLSL-specific part).
This commit is contained in:
parent
66e2faf844
commit
b3dc3acd59
9 changed files with 272 additions and 159 deletions
|
|
@ -48,7 +48,7 @@ class TParserToken;
|
|||
|
||||
class TScanContext {
|
||||
public:
|
||||
explicit TScanContext(TParseContext& pc) : parseContext(pc), afterType(false), field(false) { }
|
||||
explicit TScanContext(TParseContextBase& pc) : parseContext(pc), afterType(false), field(false) { }
|
||||
virtual ~TScanContext() { }
|
||||
|
||||
static void fillInKeywordMap();
|
||||
|
|
@ -72,7 +72,7 @@ protected:
|
|||
int firstGenerationImage(bool inEs310);
|
||||
int secondGenerationImage();
|
||||
|
||||
TParseContext& parseContext;
|
||||
TParseContextBase& parseContext;
|
||||
bool afterType; // true if we've recognized a type, so can only be looking for an identifier
|
||||
bool field; // true if we're on a field, right after a '.'
|
||||
TSourceLoc loc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue