X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramsyntax.cpp;h=f87488dc7a2b530a56c38841965430c0973f5738;hp=83cfbb089b4d5d3278722b384c82a91a382aa4d1;hb=a0caabaed3aeb8947133d78986bfb4ae5ae3c893;hpb=7434b80c452eb8f7ac8200a6f693a9eb668421f0 diff --git a/source/programsyntax.cpp b/source/programsyntax.cpp index 83cfbb08..f87488dc 100644 --- a/source/programsyntax.cpp +++ b/source/programsyntax.cpp @@ -87,6 +87,12 @@ void ExpressionStatement::visit(NodeVisitor &visitor) } +void Import::visit(NodeVisitor &visitor) +{ + visitor.visit(*this); +} + + void Layout::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -130,7 +136,15 @@ void InterfaceBlock::visit(NodeVisitor &visitor) FunctionDeclaration::FunctionDeclaration(): - definition(false) + definition(0) +{ } + +FunctionDeclaration::FunctionDeclaration(const FunctionDeclaration &other): + return_type(other.return_type), + name(other.name), + parameters(other.parameters), + definition(other.definition==&other ? this : other.definition), + body(other.body) { } void FunctionDeclaration::visit(NodeVisitor &visitor)