]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/visitor.h
Add some documentation to the GLSL compiler
[libs/gl.git] / source / glsl / visitor.h
index a26e785c741e3b97e643d78f6353742feca04dd2..4e48a1a11f112205ec10feedf2017d6c7099ddd1 100644 (file)
@@ -9,6 +9,7 @@ namespace Msp {
 namespace GL {
 namespace SL {
 
+/** Base class for all node visitors. */
 class NodeVisitor
 {
 protected:
@@ -42,6 +43,7 @@ public:
        virtual void visit(Jump &) { }
 };
 
+/** An intermediate base visitor class which traverses the syntax tree. */
 class TraversingVisitor: public NodeVisitor
 {
 protected:
@@ -69,6 +71,7 @@ public:
        virtual void visit(Return &);
 };
 
+/** Gathers nodes of a particular type from the syntax tree. */
 template<typename T>
 class NodeGatherer: private TraversingVisitor
 {
@@ -82,6 +85,7 @@ private:
        virtual void visit(T &n) { nodes.push_back(&n); }
 };
 
+/** Removes a set of nodes from the syntax tree. */
 class NodeRemover: private TraversingVisitor
 {
 private: