X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fglsl%2Fsyntax.cpp;h=e20d6c262eae2525a0a979922c800e9956f39f18;hb=4c805f55d89919d6971d600102ab4d6d65d56dc3;hp=b74f482aa8df5a21dfffebc23c2f2b6fb8a8dd21;hpb=2b74d276f67d07e37b56aeebc474a58ceeea3e68;p=libs%2Fgl.git diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index b74f482a..e20d6c26 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;