X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramsyntax.cpp;h=83cfbb089b4d5d3278722b384c82a91a382aa4d1;hb=2b073e0a3808f8ece4b93669395e4b812214cf5d;hp=299e23b4e6e984ea7d10d66c250588cd9631e7ae;hpb=961715848c111907b5f443c5b545a429b40583e6;p=libs%2Fgl.git diff --git a/source/programsyntax.cpp b/source/programsyntax.cpp index 299e23b4..83cfbb08 100644 --- a/source/programsyntax.cpp +++ b/source/programsyntax.cpp @@ -54,11 +54,18 @@ void UnaryExpression::visit(NodeVisitor &visitor) } -BinaryExpression::BinaryExpression(): - assignment(false) +void BinaryExpression::visit(NodeVisitor &visitor) +{ + visitor.visit(*this); +} + + +Assignment::Assignment(): + self_referencing(false), + target_declaration(0) { } -void BinaryExpression::visit(NodeVisitor &visitor) +void Assignment::visit(NodeVisitor &visitor) { visitor.visit(*this); } @@ -110,7 +117,8 @@ void VariableDeclaration::visit(NodeVisitor &visitor) } -InterfaceBlock::InterfaceBlock() +InterfaceBlock::InterfaceBlock(): + array(false) { members.use_braces = true; } @@ -137,6 +145,12 @@ void Conditional::visit(NodeVisitor &visitor) } +void Iteration::visit(NodeVisitor &visitor) +{ + visitor.visit(*this); +} + + void Passthrough::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -149,9 +163,9 @@ void Return::visit(NodeVisitor &visitor) } -void Iteration::visit(NodeVisitor &visitor) +void NodeVisitor::visit(Assignment &assign) { - visitor.visit(*this); + visit(static_cast(assign)); } @@ -248,18 +262,14 @@ void TraversingVisitor::visit(Return &ret) } -Context::Context(ContextType t): +Stage::Stage(StageType t): type(t), - present(false), previous(0) { } Module::Module(): - global_context(GLOBAL), - vertex_context(VERTEX), - geometry_context(GEOMETRY), - fragment_context(FRAGMENT) + shared(SHARED) { } } // namespace ProgramSyntax