diff options
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 5db58db7ef9..9b95062c035 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -122,17 +122,6 @@ Unit* unit; } -Slice::ParserVisitor::ParserVisitor(int warningLevel) : - _warningLevel(warningLevel) -{ -} - -int -Slice::ParserVisitor::warningLevel() -{ - return _warningLevel; -} - // ---------------------------------------------------------------------- // DefinitionContext // ---------------------------------------------------------------------- @@ -204,6 +193,13 @@ Slice::DefinitionContext::getMetaData() const return _metaData; } +bool +Slice::DefinitionContext::suppressWarning(const string& name) const +{ + string q = findMetaData("suppress-warning"); + return q == "suppress-warning" || q == "supress-warning:all" || q == ("suppress-warning:" + name); +} + // ---------------------------------------------------------------------- // SyntaxTreeBase // ---------------------------------------------------------------------- |