From 2fab4ba8ad56f229cf3a41975bb5be9b39c949fd Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 18 Nov 2010 13:01:27 +1000 Subject: GLSL AST nodes for function and struct decls --- src/libs/glsl/glslast.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/libs/glsl/glslast.cpp') 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); +} -- cgit v1.2.1