diff --git a/src/language/ASTNodeAffectationExpressionBuilder.cpp b/src/language/ASTNodeAffectationExpressionBuilder.cpp index c515da24dbd4ebc8bb47f89d5a4266939ccff70a..23fe98211fc8e4af195219e6594eecc4687b1f9c 100644 --- a/src/language/ASTNodeAffectationExpressionBuilder.cpp +++ b/src/language/ASTNodeAffectationExpressionBuilder.cpp @@ -92,6 +92,10 @@ ASTNodeAffectationExpressionBuilder::ASTNodeAffectationExpressionBuilder(ASTNode set_affectation_processor_for_string_data(data_type); break; } + case ASTNodeDataType::typename_t: { + throw parse_error("unexpected error: compound type affectation NIY", std::vector{n.begin()}); + break; + } default: { throw parse_error("unexpected error: undefined value type for affectation", std::vector{n.begin()}); } diff --git a/src/language/ASTNodeDataVariant.hpp b/src/language/ASTNodeDataVariant.hpp index 6a382172918594b09224f8215c8d964430aa8159..8f350c7348a6946aec92652db53265bb00cbf814 100644 --- a/src/language/ASTNodeDataVariant.hpp +++ b/src/language/ASTNodeDataVariant.hpp @@ -1,8 +1,23 @@ #ifndef AST_NODE_DATA_VARIANT_HPP #define AST_NODE_DATA_VARIANT_HPP +#include <memory> #include <variant> -using ASTNodeDataVariant = std::variant<std::monostate, bool, uint64_t, int64_t, double, std::string>; +struct CompoundDataVariant; + +using ASTNodeDataVariant = + std::variant<std::monostate, bool, uint64_t, int64_t, double, std::string, CompoundDataVariant>; + +struct CompoundDataVariant +{ + std::vector<ASTNodeDataVariant> m_data_vector; + friend std::ostream& + operator<<(std::ostream& os, const CompoundDataVariant&) + { + os << " *CompoundDataVariant* "; + return os; + } +}; #endif // AST_NODE_DATA_VARIANT_HPP