summaryrefslogtreecommitdiff
path: root/src/glsl/pp/sl_pp_process.h
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-06-26 11:44:43 +0200
committerMichal Krol <michal@vmware.com>2009-09-07 10:11:50 +0200
commit3b027bca9d54383b2fc8b2ad5a9cb6d2166c7acc (patch)
treeb7a9904765a0ff67e1c50705bae0fc7975c46b6e /src/glsl/pp/sl_pp_process.h
parent3bb446ba6e890bc3f60a34318a5a0fe860e53cbb (diff)
glsl: Support if preprocessor directive and friends.
Diffstat (limited to 'src/glsl/pp/sl_pp_process.h')
-rw-r--r--src/glsl/pp/sl_pp_process.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/glsl/pp/sl_pp_process.h b/src/glsl/pp/sl_pp_process.h
index 37cdc4c9a7..cc934bd89c 100644
--- a/src/glsl/pp/sl_pp_process.h
+++ b/src/glsl/pp/sl_pp_process.h
@@ -33,7 +33,11 @@
#include "sl_pp_token.h"
-struct sl_pp_process_state;
+struct sl_pp_process_state {
+ struct sl_pp_token_info *out;
+ unsigned int out_len;
+ unsigned int out_max;
+};
int
sl_pp_process(struct sl_pp_context *context,
@@ -48,6 +52,42 @@ sl_pp_process_define(struct sl_pp_context *context,
struct sl_pp_macro *macro);
int
+sl_pp_process_if(struct sl_pp_context *context,
+ const struct sl_pp_token_info *input,
+ unsigned int first,
+ unsigned int last);
+
+int
+sl_pp_process_ifdef(struct sl_pp_context *context,
+ const struct sl_pp_token_info *input,
+ unsigned int first,
+ unsigned int last);
+
+int
+sl_pp_process_ifndef(struct sl_pp_context *context,
+ const struct sl_pp_token_info *input,
+ unsigned int first,
+ unsigned int last);
+
+int
+sl_pp_process_elif(struct sl_pp_context *context,
+ const struct sl_pp_token_info *input,
+ unsigned int first,
+ unsigned int last);
+
+int
+sl_pp_process_else(struct sl_pp_context *context,
+ const struct sl_pp_token_info *input,
+ unsigned int first,
+ unsigned int last);
+
+int
+sl_pp_process_endif(struct sl_pp_context *context,
+ const struct sl_pp_token_info *input,
+ unsigned int first,
+ unsigned int last);
+
+int
sl_pp_process_out(struct sl_pp_process_state *state,
const struct sl_pp_token_info *token);