]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/debug.h
Handle expression replacement through TraversingVisitor
[libs/gl.git] / source / glsl / debug.h
index b377b84488a5cd897645f63ad728d80337262858..3837c569bb18e13aacf3d02a9d1d58eadecd5cb0 100644 (file)
@@ -22,6 +22,16 @@ private:
                REACH = 0x2574         // ╴
        };
 
+       struct Branch
+       {
+               std::string text;
+               Node *node;
+
+               Branch(const char *t, Node *n = 0): text(t), node(n) { }
+               Branch(const std::string &t, Node *n = 0): text(t), node(n) { }
+               Branch(Node *n): node(n) { }
+       };
+
        std::map<const Node *, unsigned> node_labels;
        std::string formatted;
        std::vector<TreeChars> tree;
@@ -31,11 +41,13 @@ public:
 
 private:
        void append(const std::string &);
+       void append_subtree(const std::vector<Branch> &);
        void begin_sub();
        void last_branch();
        void end_sub();
        void annotated_branch(const std::string &, Node &);
        unsigned get_label(const Node &);
+       std::string format_type(TypeDeclaration *);
 
        template<typename T>
        typename T::const_iterator increment(typename T::const_iterator &, const T &);
@@ -46,6 +58,7 @@ private:
        virtual void visit(VariableReference &);
        virtual void visit(InterfaceBlockReference &);
        virtual void visit(MemberAccess &);
+       virtual void visit(Swizzle &);
        virtual void visit(UnaryExpression &);
        virtual void visit(BinaryExpression &);
        virtual void visit(Assignment &);