Make the main compiler call the preprocessor.
By using a single function, the main compiler doesn't need to include glcpp.h, which currently has a lot of details about the preprocessor internals. In particular, this prevents the two yacc grammars from seeing each other, which would be rather messy to sort out.
This commit is contained in:
@@ -101,6 +101,10 @@ extern void _mesa_glsl_warning(const YYLTYPE *locp,
|
||||
_mesa_glsl_parse_state *state,
|
||||
const char *fmt, ...);
|
||||
|
||||
extern "C" {
|
||||
extern int preprocess(void *ctx, const char **shader, size_t *shader_len);
|
||||
}
|
||||
|
||||
extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
|
||||
const char *string, size_t len);
|
||||
|
||||
|
Reference in New Issue
Block a user