Introduce ExperimentalFeatures header

This commit is contained in:
Alex Beregszaszi
2017-08-10 00:15:25 +01:00
parent 690ed37fd4
commit 57c2451130
3 changed files with 42 additions and 8 deletions
+3 -2
View File
@@ -23,6 +23,7 @@
#pragma once
#include <libsolidity/ast/ASTForward.h>
#include <libsolidity/ast/ExperimentalFeatures.h>
#include <map>
#include <memory>
@@ -61,8 +62,8 @@ struct SourceUnitAnnotation: ASTAnnotation
std::string path;
/// The exported symbols (all global symbols).
std::map<ASTString, std::vector<Declaration const*>> exportedSymbols;
/// Experimental feature pragmas.
std::set<ASTString> experimentalFeatures;
/// Experimental features.
std::set<ExperimentalFeature> experimentalFeatures;
};
struct ImportAnnotation: ASTAnnotation
+35
View File
@@ -0,0 +1,35 @@
/*
This file is part of solidity.
solidity is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
solidity is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* List of experimental features.
*/
#pragma once
#include <map>
namespace dev
{
namespace solidity
{
enum class ExperimentalFeature {};
static const std::map<std::string, ExperimentalFeature> ExperimentalFeatureNames = {};
}
}