summaryrefslogtreecommitdiff
path: root/src/libs/glsl/glslast.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-11-18 13:01:27 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-11-18 13:36:50 +1000
commit2fab4ba8ad56f229cf3a41975bb5be9b39c949fd (patch)
tree26a452510b0d09288ad94454a0d475d9ecdbc0ed /src/libs/glsl/glslast.cpp
parent0fa980028ea74c7ba7afa610a4572b6513c45cfb (diff)
downloadqt-creator-2fab4ba8ad56f229cf3a41975bb5be9b39c949fd.tar.gz
GLSL AST nodes for function and struct decls
Diffstat (limited to 'src/libs/glsl/glslast.cpp')
-rw-r--r--src/libs/glsl/glslast.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libs/glsl/glslast.cpp b/src/libs/glsl/glslast.cpp
index 28c8c97f28..7f81e59f28 100644
--- a/src/libs/glsl/glslast.cpp
+++ b/src/libs/glsl/glslast.cpp
@@ -394,6 +394,15 @@ void TypeDeclaration::accept0(Visitor *visitor)
visitor->endVisit(this);
}
+void TypeAndVariableDeclaration::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(typeDecl, visitor);
+ accept(varDecl, visitor);
+ }
+ visitor->endVisit(this);
+}
+
void InvariantDeclaration::accept0(Visitor *visitor)
{
visitor->visit(this);
@@ -406,3 +415,13 @@ void InitDeclaration::accept0(Visitor *visitor)
accept(decls, visitor);
visitor->endVisit(this);
}
+
+void FunctionDeclaration::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(returnType, visitor);
+ accept(params, visitor);
+ accept(body, visitor);
+ }
+ visitor->endVisit(this);
+}