<commit_before>//=======================================================================
// Copyright <NAME> 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================

#ifndef AST_STRUCT_VALUE_H
#define AST_STRUCT_VALUE_H

#include <memory>
#include <string>

#include <boost/optional.hpp>

#include "Type.hpp"

#include "ast/Deferred.hpp"
#include "ast/Position.hpp"

namespace eddic {

class Context;
class Variable;

namespace ast {

/*!
 * \class ASTStructValue
 * \brief The AST node for a value of an array. 
 * Should only be used from the Deferred version (eddic::ast::StructValue).
 */
struct ASTStructValue {
    std::shared_ptr<Context> context;

    Position position;
    std::string variableName;
    std::string memberName;

    std::shared_ptr<Variable> variable;
    boost::optional<eddic::Type> type;

    mutable long references = 0;
};

/*!
 * \typedef StructValue
 * \brief The AST node for a value of an array.
 */
typedef Deferred<ASTStructValue> StructValue;

} //end of ast

} //end of eddic

//Adapt the struct for the AST
BOOST_FUSION_ADAPT_STRUCT(
    eddic::ast::StructValue, 
    (eddic::ast::Position, Content->position)
    (std::string, Content->variableName)
    (std::string, Content->memberName)
)

#endif
<commit_msg>Remove the cached member type<commit_after>//=======================================================================
// Copyright <NAME> 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================

#ifndef AST_STRUCT_VALUE_H
#define AST_STRUCT_VALUE_H

#include <memory>
#include <string>

#include <boost/optional.hpp>

#include "Type.hpp"

#include "ast/Deferred.hpp"
#include "ast/Position.hpp"

namespace eddic {

class Context;
class Variable;

namespace ast {

/*!
 * \class ASTStructValue
 * \brief The AST node for a value of an array. 
 * Should only be used from the Deferred version (eddic::ast::StructValue).
 */
struct ASTStructValue {
    std::shared_ptr<Context> context;

    Position position;
    std::string variableName;
    std::string memberName;

    std::shared_ptr<Variable> variable;

    mutable long references = 0;
};

/*!
 * \typedef StructValue
 * \brief The AST node for a value of an array.
 */
typedef Deferred<ASTStructValue> StructValue;

} //end of ast

} //end of eddic

//Adapt the struct for the AST
BOOST_FUSION_ADAPT_STRUCT(
    eddic::ast::StructValue, 
    (eddic::ast::Position, Content->position)
    (std::string, Content->variableName)
    (std::string, Content->memberName)
)

#endif

{'fraction_non_alphanumeric': 0.2106929300035174, 'fraction_numerical': 0.007738304607808653, 'mean_word_length': 4.45873320537428, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4198304', 'n_tokens_mistral': 909, 'n_tokens_neox': 846, 'n_words': 240}