X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramsyntax.cpp;h=098130f87c2e4920597eadb2838295b782dbf740;hb=74bd3813b9744550c9ac5980588e561835b616d9;hp=83cfbb089b4d5d3278722b384c82a91a382aa4d1;hpb=2b073e0a3808f8ece4b93669395e4b812214cf5d;p=libs%2Fgl.git diff --git a/source/programsyntax.cpp b/source/programsyntax.cpp index 83cfbb08..098130f8 100644 --- a/source/programsyntax.cpp +++ b/source/programsyntax.cpp @@ -72,6 +72,7 @@ void Assignment::visit(NodeVisitor &visitor) FunctionCall::FunctionCall(): + declaration(0), constructor(false) { } @@ -87,6 +88,12 @@ void ExpressionStatement::visit(NodeVisitor &visitor) } +void Import::visit(NodeVisitor &visitor) +{ + visitor.visit(*this); +} + + void Layout::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -130,7 +137,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)