diff options
author | Rhys Weatherley <[email protected]> | 2010-11-18 13:01:27 +1000 |
---|---|---|
committer | Rhys Weatherley <[email protected]> | 2010-11-18 13:36:50 +1000 |
commit | 2fab4ba8ad56f229cf3a41975bb5be9b39c949fd (patch) | |
tree | 26a452510b0d09288ad94454a0d475d9ecdbc0ed /src/libs/glsl/glslast.cpp | |
parent | 0fa980028ea74c7ba7afa610a4572b6513c45cfb (diff) |
GLSL AST nodes for function and struct decls
Diffstat (limited to 'src/libs/glsl/glslast.cpp')
-rw-r--r-- | src/libs/glsl/glslast.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libs/glsl/glslast.cpp b/src/libs/glsl/glslast.cpp index 28c8c97f28d..7f81e59f282 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); +} |