X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.cpp;h=d7eec3da4bf680cbf4125d0cb747feccd54af38d;hb=4414f0245005c8cfcd02b51ea394d612cc5776c4;hp=931578640b94fc4f874b25648dfef01fd0330c0d;hpb=a82fcc462550d63a101aca4313807b1320789a5a;p=libs%2Fgl.git diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index 93157864..d7eec3da 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -94,7 +94,9 @@ void Block::visit(NodeVisitor &visitor) Expression::Expression(): - oper(0) + oper(0), + type(0), + lvalue(false) { } @@ -237,6 +239,39 @@ void InterfaceLayout::visit(NodeVisitor &visitor) } +BasicTypeDeclaration::BasicTypeDeclaration(): + kind(ALIAS), + size(0), + base_type(0) +{ } + +BasicTypeDeclaration::BasicTypeDeclaration(const BasicTypeDeclaration &other): + TypeDeclaration(other), + kind(other.kind), + size(other.size), + base(other.base), + base_type(0) +{ } + +void BasicTypeDeclaration::visit(NodeVisitor &visitor) +{ + visitor.visit(*this); +} + + +ImageTypeDeclaration::ImageTypeDeclaration(): + dimensions(TWO), + array(false), + sampled(true), + shadow(false) +{ } + +void ImageTypeDeclaration::visit(NodeVisitor &visitor) +{ + visitor.visit(*this); +} + + StructDeclaration::StructDeclaration() { members.use_braces = true; @@ -314,7 +349,8 @@ void InterfaceBlock::visit(NodeVisitor &visitor) FunctionDeclaration::FunctionDeclaration(): - definition(0) + definition(0), + return_type_declaration(0) { } FunctionDeclaration::FunctionDeclaration(const FunctionDeclaration &other): @@ -323,7 +359,8 @@ FunctionDeclaration::FunctionDeclaration(const FunctionDeclaration &other): name(other.name), parameters(other.parameters), body(other.body), - definition(other.definition==&other ? this : 0) + definition(other.definition==&other ? this : 0), + return_type_declaration(0) { } void FunctionDeclaration::visit(NodeVisitor &visitor)