]> git.tdb.fi Git - libs/gl.git/blob - source/glsl/preprocessor.h
Minor cleanups and tweaks
[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, unsigned, const std::string &> signal_source;
18         sigc::signal<void, Stage::Type> signal_stage_change;
19         sigc::signal<void, int, unsigned> signal_line;
20
21 private:
22         Tokenizer &tokenizer;
23
24 public:
25         Preprocessor(Tokenizer &);
26
27         void preprocess();
28 private:
29         void preprocess_version();
30         void preprocess_line();
31         void preprocess_pragma();
32         void preprocess_pragma_msp();
33         void preprocess_stage();
34         void preprocess_source();
35 };
36
37 } // namespace SL
38 } // namespace GL
39 } // namespace Msp
40
41 #endif