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
|
|
@ -83,7 +83,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
namespace glslang {
|
||||
|
||||
TPpContext::TPpContext(TParseContext& pc, const TShader::Includer& inclr) :
|
||||
TPpContext::TPpContext(TParseContextBase& pc, const TShader::Includer& inclr) :
|
||||
preamble(0), strings(0), parseContext(pc), includer(inclr), inComment(false)
|
||||
{
|
||||
InitAtomTable();
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class TInputScanner;
|
|||
// Don't expect too much in terms of OO design.
|
||||
class TPpContext {
|
||||
public:
|
||||
TPpContext(TParseContext&, const TShader::Includer&);
|
||||
TPpContext(TParseContextBase&, const TShader::Includer&);
|
||||
virtual ~TPpContext();
|
||||
|
||||
void setPreamble(const char* preamble, size_t length);
|
||||
|
|
@ -213,7 +213,7 @@ protected:
|
|||
|
||||
// Scanner data:
|
||||
int previous_token;
|
||||
TParseContext& parseContext;
|
||||
TParseContextBase& parseContext;
|
||||
|
||||
// Get the next token from *stack* of input sources, popping input sources
|
||||
// that are out of tokens, down until an input sources is found that has a token.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue