22 struct PreprocessorImpl
24 Diagnostics* diagnostics;
27 DirectiveParser directiveParser;
28 MacroExpander macroExpander;
30 PreprocessorImpl(Diagnostics* diag,
31 DirectiveHandler* directiveHandler) :
34 directiveParser(&tokenizer, ¯oSet, diag, directiveHandler),
35 macroExpander(&directiveParser, ¯oSet, diag)
43 mImpl =
new PreprocessorImpl(diagnostics, directiveHandler);
52 const char*
const string[],
55 static const int kGLSLVersion = 100;
63 return mImpl->tokenizer.init(count,
string, length);
73 token.
text = stream.str();
81 mImpl->macroSet[
name] = macro;
86 bool validToken =
false;
89 mImpl->macroExpander.lex(token);
107 token->
text.assign(
"0");
121 token->
text.assign(
"0.0");
GLuint const GLfloat * val
bool init(size_t count, const char *const string[], const int length[])
EGLImageKHR EGLint * name
Replacements replacements
bool iValue(int *value) const
void predefineMacro(const char *name, int value)
std::map< std::string, Macro > MacroSet
EGLSurface EGLint void ** value
bool fValue(float *value) const
Preprocessor(Diagnostics *diagnostics, DirectiveHandler *directiveHandler)