X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.cpp;h=957b49cea61a149fc213f9dbe71ecc9fa9774d1b;hb=947bb7477205c038aa1804b84452cddd2108550a;hp=affc09adfad7badff8ca65d7e39a4730fc9629be;hpb=d2f75fa9ccf8252ff8a750071b26e77047a346cb;p=libs%2Fgl.git diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index affc09ad..957b49ce 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -98,12 +98,27 @@ VariableReference::VariableReference(): declaration(0) { } +VariableReference::VariableReference(const VariableReference &other): + name(other.name), + declaration(0) +{ } + void VariableReference::visit(NodeVisitor &visitor) { visitor.visit(*this); } +MemberAccess::MemberAccess(): + declaration(0) +{ } + +MemberAccess::MemberAccess(const MemberAccess &other): + left(other.left), + member(other.member), + declaration(0) +{ } + void MemberAccess::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -131,6 +146,11 @@ Assignment::Assignment(): target_declaration(0) { } +Assignment::Assignment(const Assignment &other): + self_referencing(other.self_referencing), + target_declaration(0) +{ } + void Assignment::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -142,6 +162,13 @@ FunctionCall::FunctionCall(): constructor(false) { } +FunctionCall::FunctionCall(const FunctionCall &other): + name(other.name), + declaration(0), + constructor(other.constructor), + arguments(other.arguments) +{ } + void FunctionCall::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -196,6 +223,22 @@ VariableDeclaration::VariableDeclaration(): linked_declaration(0) { } +VariableDeclaration::VariableDeclaration(const VariableDeclaration &other): + constant(other.constant), + sampling(other.sampling), + interpolation(other.interpolation), + interface(other.interface), + precision(other.precision), + type(other.type), + type_declaration(0), + name(other.name), + array(other.array), + array_size(other.array_size), + init_expression(other.init_expression), + linked_declaration(0), + layout(other.layout) +{ } + void VariableDeclaration::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -222,7 +265,7 @@ FunctionDeclaration::FunctionDeclaration(const FunctionDeclaration &other): return_type(other.return_type), name(other.name), parameters(other.parameters), - definition(other.definition==&other ? this : other.definition), + definition(other.definition==&other ? this : 0), body(other.body) { }