diff options
author | chriseth <chris@ethereum.org> | 2017-08-10 21:23:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-10 21:23:34 +0800 |
commit | 41e3cbe0844f6e3e8e98925981bcdfd76ea24088 (patch) | |
tree | f333064e30aca548634a697a87a0ca21f0770a02 /libsolidity/ast | |
parent | 0a5553b7b1d2920b3a05c43e776e8d6b382218c8 (diff) | |
parent | 470950e75e6f3a8a37d2a8fe1c263149be01c402 (diff) | |
download | dexon-solidity-41e3cbe0844f6e3e8e98925981bcdfd76ea24088.tar dexon-solidity-41e3cbe0844f6e3e8e98925981bcdfd76ea24088.tar.gz dexon-solidity-41e3cbe0844f6e3e8e98925981bcdfd76ea24088.tar.bz2 dexon-solidity-41e3cbe0844f6e3e8e98925981bcdfd76ea24088.tar.lz dexon-solidity-41e3cbe0844f6e3e8e98925981bcdfd76ea24088.tar.xz dexon-solidity-41e3cbe0844f6e3e8e98925981bcdfd76ea24088.tar.zst dexon-solidity-41e3cbe0844f6e3e8e98925981bcdfd76ea24088.zip |
Merge pull request #2690 from ethereum/experimental-pragma
Support experimental feature pragma
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/ASTAnnotations.h | 3 | ||||
-rw-r--r-- | libsolidity/ast/ExperimentalFeatures.h | 35 |
2 files changed, 38 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTAnnotations.h b/libsolidity/ast/ASTAnnotations.h index f757f03c..fd9efb4d 100644 --- a/libsolidity/ast/ASTAnnotations.h +++ b/libsolidity/ast/ASTAnnotations.h @@ -23,6 +23,7 @@ #pragma once #include <libsolidity/ast/ASTForward.h> +#include <libsolidity/ast/ExperimentalFeatures.h> #include <map> #include <memory> @@ -61,6 +62,8 @@ struct SourceUnitAnnotation: ASTAnnotation std::string path; /// The exported symbols (all global symbols). std::map<ASTString, std::vector<Declaration const*>> exportedSymbols; + /// Experimental features. + std::set<ExperimentalFeature> experimentalFeatures; }; struct ImportAnnotation: ASTAnnotation diff --git a/libsolidity/ast/ExperimentalFeatures.h b/libsolidity/ast/ExperimentalFeatures.h new file mode 100644 index 00000000..b0a07142 --- /dev/null +++ b/libsolidity/ast/ExperimentalFeatures.h @@ -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 = {}; + +} +} |