diff options
| author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-08 21:09:57 +0800 |
|---|---|---|
| committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-10 07:15:25 +0800 |
| commit | 57c24511308f9cd1f981e92aacfb880825eb6ed9 (patch) | |
| tree | f027135713c992ad08d27c5fc0e759f4b8fc2af3 /libsolidity/ast | |
| parent | 690ed37fd4b90119ac69def3e308035d46af0c60 (diff) | |
| download | dexon-solidity-57c24511308f9cd1f981e92aacfb880825eb6ed9.tar dexon-solidity-57c24511308f9cd1f981e92aacfb880825eb6ed9.tar.gz dexon-solidity-57c24511308f9cd1f981e92aacfb880825eb6ed9.tar.bz2 dexon-solidity-57c24511308f9cd1f981e92aacfb880825eb6ed9.tar.lz dexon-solidity-57c24511308f9cd1f981e92aacfb880825eb6ed9.tar.xz dexon-solidity-57c24511308f9cd1f981e92aacfb880825eb6ed9.tar.zst dexon-solidity-57c24511308f9cd1f981e92aacfb880825eb6ed9.zip | |
Introduce ExperimentalFeatures header
Diffstat (limited to 'libsolidity/ast')
| -rw-r--r-- | libsolidity/ast/ASTAnnotations.h | 5 | ||||
| -rw-r--r-- | libsolidity/ast/ExperimentalFeatures.h | 35 |
2 files changed, 38 insertions, 2 deletions
diff --git a/libsolidity/ast/ASTAnnotations.h b/libsolidity/ast/ASTAnnotations.h index 083ecfa4..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,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 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 = {}; + +} +} |
