diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/elna/boot/evaluator.h | 2 | ||||
| -rw-r--r-- | include/elna/gcc/elna-generic.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/elna/boot/evaluator.h b/include/elna/boot/evaluator.h index f1a5437..08aec6b 100644 --- a/include/elna/boot/evaluator.h +++ b/include/elna/boot/evaluator.h @@ -80,11 +80,11 @@ namespace elna::boot std::optional<constant_value> evaluate_unary(unary_expression& subject); std::optional<constant_value> evaluate_binary(binary_expression& subject); std::optional<constant_value> evaluate_cast(cast_expression& subject); - std::optional<constant_value> evaluate_traits(traits_expression& subject); std::optional<std::size_t> evaluate_traits_size(const type& subject); std::optional<std::size_t> evaluate_traits_alignment(const type& subject); public: + std::optional<constant_value> evaluate_traits(traits_expression& subject); explicit evaluator(symbol_bag& bag, const target_info& target, const std::map<std::string, expression*>& evaluated_initializers); diff --git a/include/elna/gcc/elna-generic.h b/include/elna/gcc/elna-generic.h index 9dea83b..aa4bde1 100644 --- a/include/elna/gcc/elna-generic.h +++ b/include/elna/gcc/elna-generic.h @@ -17,8 +17,11 @@ along with GCC; see the file COPYING3. If not see #pragma once +#include <map> +#include <memory> #include <string> #include "elna/boot/ast.h" +#include "elna/boot/evaluator.h" #include "elna/boot/symbol.h" #include "elna/gcc/elna-tree.h" @@ -36,6 +39,8 @@ namespace elna::gcc elna::boot::symbol_bag bag; std::shared_ptr<symbol_table> symbols; const elna::boot::target_info& target; + std::map<std::string, boot::expression *> evaluated_initializers; + std::unique_ptr<boot::evaluator> const_evaluator; void enter_scope(); tree leave_scope(); |
