From 908d73f0d004cc5af5b846eacf94a2f97dec349d Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 9 May 2011 13:52:03 +0200 Subject: Added the Enumerator class as a special Declaration. Reviewed-by: Roberto Raggi --- src/shared/cplusplus/Control.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/shared/cplusplus/Control.cpp') diff --git a/src/shared/cplusplus/Control.cpp b/src/shared/cplusplus/Control.cpp index 557b5b0fc5..3492077a94 100644 --- a/src/shared/cplusplus/Control.cpp +++ b/src/shared/cplusplus/Control.cpp @@ -326,6 +326,13 @@ public: return declaration; } + EnumeratorDeclaration *newEnumeratorDeclaration(unsigned sourceLocation, const Name *name) + { + EnumeratorDeclaration *decl = new EnumeratorDeclaration(translationUnit, sourceLocation, name); + symbols.push_back(decl); + return decl; + } + Argument *newArgument(unsigned sourceLocation, const Name *name) { Argument *argument = new Argument(translationUnit, sourceLocation, name); @@ -713,6 +720,9 @@ Block *Control::newBlock(unsigned sourceLocation) Declaration *Control::newDeclaration(unsigned sourceLocation, const Name *name) { return d->newDeclaration(sourceLocation, name); } +EnumeratorDeclaration *Control::newEnumeratorDeclaration(unsigned sourceLocation, const Name *name) +{ return d->newEnumeratorDeclaration(sourceLocation, name); } + UsingNamespaceDirective *Control::newUsingNamespaceDirective(unsigned sourceLocation, const Name *name) { return d->newUsingNamespaceDirective(sourceLocation, name); } -- cgit v1.2.1