]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/output.h
Remove the using declarations from visitors
[libs/gl.git] / source / glsl / output.h
index 5b03420223c3f70fb57f7f900f6708e2da5efe39..b8554b7d1aa83eb95f89e1647a280492883065e3 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_SL_OUTPUT_H_
 #define MSP_GL_SL_OUTPUT_H_
 
+#include "compiler.h"
 #include "syntax.h"
 #include "visitor.h"
 
@@ -12,6 +13,7 @@ class Formatter: private TraversingVisitor
 {
 private:
        Stage *stage;
+       Compiler::Mode mode;
        std::string formatted;
        unsigned source_index;
        unsigned source_line;
@@ -22,7 +24,8 @@ private:
 public:
        Formatter();
 
-       const std::string &apply(Stage &);
+       const std::string &apply(Stage &, Compiler::Mode);
+       const std::string &apply(Node &n) { n.visit(*this); return formatted; }
 
 private:
        void append(const std::string &);
@@ -49,9 +52,9 @@ private:
        virtual void visit(FunctionDeclaration &);
        virtual void visit(Conditional &);
        virtual void visit(Iteration &);
+       virtual void visit(Passthrough &);
        virtual void visit(Return &);
        virtual void visit(Jump &);
-       using TraversingVisitor::visit;
 };
 
 } // namespace SL