]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programsyntax.cpp
Implement an import system
[libs/gl.git] / source / programsyntax.cpp
index 83cfbb089b4d5d3278722b384c82a91a382aa4d1..f87488dc7a2b530a56c38841965430c0973f5738 100644 (file)
@@ -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)