]> git.tdb.fi Git - libs/gl.git/blob - source/glsl/preprocessor.h
Split tokenizer and preprocessor out of the GLSL parser
[libs/gl.git] / source / glsl / preprocessor.h
1 #ifndef MSP_GL_SL_PREPROCESSOR_H_
2 #define MSP_GL_SL_PREPROCESSOR_H_
3
4 #include <sigc++/signal.h>
5 #include "syntax.h"
6
7 namespace Msp {
8 namespace GL {
9 namespace SL {
10
11 class Tokenizer;
12
13 class Preprocessor
14 {
15 public:
16         sigc::signal<void, const Version &> signal_version;
17         sigc::signal<void, StageType> signal_stage_change;
18
19 private:
20         Tokenizer &tokenizer;
21
22 public:
23         Preprocessor(Tokenizer &);
24
25         void preprocess();
26 private:
27         void preprocess_version();
28         void preprocess_pragma();
29         void preprocess_pragma_msp();
30         void preprocess_stage();
31 };
32
33 } // namespace SL
34 } // namespace GL
35 } // namespace Msp
36
37 #endif