]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programcompiler.h
Fix a copypaste error in AnimationPlayer uniform setting code
[libs/gl.git] / source / programcompiler.h
index d8b2608afe9b885a5e5b376761b80f1bed0d02c7..1f0601b5871f859a5dc771f6566f9311644d355d 100644 (file)
@@ -216,7 +216,9 @@ private:
                virtual void visit(ProgramSyntax::Block &);
                virtual void visit(ProgramSyntax::UnaryExpression &);
                virtual void visit(ProgramSyntax::BinaryExpression &);
+               virtual void visit(ProgramSyntax::MemberAccess &);
                virtual void visit(ProgramSyntax::FunctionCall &);
+               virtual void visit(ProgramSyntax::VariableDeclaration &);
                virtual void visit(ProgramSyntax::Return &);
        };
 
@@ -225,12 +227,11 @@ private:
                typedef std::map<ProgramSyntax::VariableDeclaration *, ProgramSyntax::Expression *> ValueMap;
 
                const ValueMap *variable_values;
-               bool const_only;
                float result;
                bool result_valid;
 
                ExpressionEvaluator();
-               ExpressionEvaluator(const ValueMap *, bool);
+               ExpressionEvaluator(const ValueMap &);
 
                using ProgramSyntax::NodeVisitor::visit;
                virtual void visit(ProgramSyntax::Literal &);
@@ -243,13 +244,14 @@ private:
        struct ConstantConditionEliminator: BlockModifier
        {
                unsigned scope_level;
-               bool in_loop;
+               bool record_only;
                ExpressionEvaluator::ValueMap variable_values;
 
                ConstantConditionEliminator();
 
                using Visitor::visit;
                virtual void visit(ProgramSyntax::Block &);
+               virtual void visit(ProgramSyntax::UnaryExpression &);
                virtual void visit(ProgramSyntax::Assignment &);
                virtual void visit(ProgramSyntax::VariableDeclaration &);
                virtual void visit(ProgramSyntax::Conditional &);
@@ -277,6 +279,7 @@ private:
                std::vector<BlockVariableMap> variables;
                ProgramSyntax::Assignment *assignment;
                bool assignment_target;
+               bool assign_to_subscript;
                bool global_scope;
 
                UnusedVariableLocator();
@@ -323,6 +326,7 @@ private:
                using Visitor::visit;
                virtual void visit(ProgramSyntax::Block &);
                virtual void visit(ProgramSyntax::VariableDeclaration &);
+               virtual void visit(ProgramSyntax::Iteration &);
        };
 
        struct PrecisionRemover: BlockModifier