diff options
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 326a20644b0..b1c1d2401b7 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -518,39 +518,6 @@ Slice::Container::createEnumerator(const string& name) return p; } -NativePtr -Slice::Container::createNative(const string& name) -{ - ContainedList matches = _unit->findContents(thisScope() + name); - if (!matches.empty()) - { - NativePtr p = NativePtr::dynamicCast(matches.front()); - if (p) - { - if (_unit->ignRedefs()) - { - return p; - } - - string msg = "redefinition of native `"; - msg += name; - msg += "'"; - _unit->error(msg); - return 0; - } - - string msg = "redefinition of `"; - msg += name; - msg += "' as native"; - _unit->error(msg); - return 0; - } - - NativePtr p = new Native(this, name); - _contents.push_back(p); - return p; -} - TypeList Slice::Container::lookupType(const string& scoped, bool printError) { @@ -767,21 +734,6 @@ Slice::Container::enums() return result; } -NativeList -Slice::Container::natives() -{ - NativeList result; - for (ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) - { - NativePtr q = NativePtr::dynamicCast(*p); - if (q) - { - result.push_back(q); - } - } - return result; -} - int Slice::Container::includeLevel() { @@ -1721,36 +1673,6 @@ Slice::DataMember::DataMember(const ContainerPtr& container, const string& name, } // ---------------------------------------------------------------------- -// Native -// ---------------------------------------------------------------------- - -bool -Slice::Native::uses(const ConstructedPtr& constructed) -{ - return false; -} - -Contained::ContainedType -Slice::Native::containedType() -{ - return ContainedTypeNative; -} - -void -Slice::Native::visit(ParserVisitor* visitor) -{ - visitor->visitNative(this); -} - -Slice::Native::Native(const ContainerPtr& container, const string& name) : - Constructed(container, name), - Type(container->unit()), - Contained(container, name), - SyntaxTreeBase(container->unit()) -{ -} - -// ---------------------------------------------------------------------- // Sequence // ---------------------------------------------------------------------- |