X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Fglsl%2Fsyntax.cpp;h=c8058c4fe9a228b102cbe4792daa83dc3f921f70;hb=ff00056daddbce2e6e16f7c09dcfcb5cde66e85c;hp=b74f482aa8df5a21dfffebc23c2f2b6fb8a8dd21;hpb=2b74d276f67d07e37b56aeebc474a58ceeea3e68;p=libs%2Fgl.git diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index b74f482a..c8058c4f 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -75,12 +75,6 @@ NodeContainer::NodeContainer(const NodeContainer &c): } -Statement::Statement(): - source(GENERATED_SOURCE), - line(1) -{ } - - Block::Block(): use_braces(false), parent(0) @@ -243,6 +237,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; @@ -320,7 +347,8 @@ void InterfaceBlock::visit(NodeVisitor &visitor) FunctionDeclaration::FunctionDeclaration(): - definition(0) + definition(0), + return_type_declaration(0) { } FunctionDeclaration::FunctionDeclaration(const FunctionDeclaration &other): @@ -329,7 +357,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)