X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramsyntax.h;h=e7b5111ea2bfd5c411c853d99bffb32ff2f74aee;hp=3db059c4f4d79c4e6252537c5a1cfc27b90e223e;hb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;hpb=16a9d75c8e124a0faf89c56533792cb97a214e37 diff --git a/source/programsyntax.h b/source/programsyntax.h index 3db059c4..e7b5111e 100644 --- a/source/programsyntax.h +++ b/source/programsyntax.h @@ -20,6 +20,9 @@ struct NodeVisitor; struct Node { +protected: + Node() { } + Node(const Node &) { } private: Node &operator=(const Node &); public: @@ -36,6 +39,7 @@ public: NodePtr() { } NodePtr(T *p): RefPtr(p) { } NodePtr(const NodePtr &p): RefPtr(p ? p->clone() : 0) { } + NodePtr &operator=(const NodePtr &p) { RefPtr::operator=(p); return *this; } template NodePtr(const RefPtr &p): RefPtr(p) { } @@ -66,6 +70,11 @@ struct FunctionDeclaration; struct Statement: Node { + unsigned source; + unsigned line; + + Statement(); + virtual Statement *clone() const = 0; };