]> git.tdb.fi Git - libs/gl.git/commitdiff
Ignore function parameters in InterfaceGenerator
authorMikko Rasa <tdb@tdb.fi>
Tue, 23 Feb 2021 22:37:04 +0000 (00:37 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 23 Feb 2021 22:37:47 +0000 (00:37 +0200)
source/glsl/generate.cpp
source/glsl/generate.h

index 0662f9891f8adec9cbd6bf32da8f47f3b75bed1b..62c879c88a2d56c1ca99c9ef3daa2de20e69c50a 100644 (file)
@@ -394,6 +394,12 @@ void InterfaceGenerator::visit(VariableDeclaration &var)
        TraversingVisitor::visit(var);
 }
 
+void InterfaceGenerator::visit(FunctionDeclaration &func)
+{
+       // Skip parameters because they're not useful here
+       func.body.visit(*this);
+}
+
 void InterfaceGenerator::visit(Passthrough &pass)
 {
        vector<VariableDeclaration *> pass_vars;
index c54860fc8c09d7e4a97b93edf721dfcf30d2792a..f904021ad726fcf544f469c0787311bd056c9aea 100644 (file)
@@ -101,6 +101,7 @@ private:
        ExpressionStatement &insert_assignment(const std::string &, Expression *);
        virtual void visit(VariableReference &);
        virtual void visit(VariableDeclaration &);
+       virtual void visit(FunctionDeclaration &);
        virtual void visit(Passthrough &);
 };