<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_FUNCTION_DECLARATION_H
#define AST_FUNCTION_DECLARATION_H

#include <boost/fusion/include/adapt_struct.hpp>

#include "ast/FunctionParameter.hpp"
#include "ast/Instruction.hpp"
#include "ast/Position.hpp"
#include "ast/VariableType.hpp"

namespace eddic {

class FunctionContext;

namespace ast {

/*!
 * \class ASTFunctionDeclaration
 * \brief The AST node for a function declaration.  
 * Should only be used from the Deferred version (eddic::ast::FunctionDeclaration).
 */
struct ASTFunctionDeclaration { 
    std::shared_ptr<FunctionContext> context;
    
    std::string mangledName;
    std::string struct_name;

    bool instantiated = false;  /*!< True indicates that this function has been instantiated from a template */
    bool marked = false;        /*!< Indicates that the function has been treated by the front end */
    bool first = true;

    Position position;
    Type returnType;
    std::string functionName;
    std::vector<FunctionParameter> parameters;
    std::vector<Instruction> instructions;

    mutable long references = 0;
};

/*!
 * \typedef FunctionDeclaration
 * \brief The AST node for a function declaration.
 */
typedef Deferred<ASTFunctionDeclaration> FunctionDeclaration; 

} //end of ast

} //end of eddic

//Adapt the struct for the AST
BOOST_FUSION_ADAPT_STRUCT(
    eddic::ast::FunctionDeclaration, 
    (eddic::ast::Position, Content->position)
    (eddic::ast::Type, Content->returnType)
    (std::string, Content->functionName)
    (std::vector<eddic::ast::FunctionParameter>, Content->parameters)
    (std::vector<eddic::ast::Instruction>, Content->instructions)
)

#endif
<commit_msg>Remove unused member<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_FUNCTION_DECLARATION_H
#define AST_FUNCTION_DECLARATION_H

#include <boost/fusion/include/adapt_struct.hpp>

#include "ast/FunctionParameter.hpp"
#include "ast/Instruction.hpp"
#include "ast/Position.hpp"
#include "ast/VariableType.hpp"

namespace eddic {

class FunctionContext;

namespace ast {

/*!
 * \class ASTFunctionDeclaration
 * \brief The AST node for a function declaration.  
 * Should only be used from the Deferred version (eddic::ast::FunctionDeclaration).
 */
struct ASTFunctionDeclaration { 
    std::shared_ptr<FunctionContext> context;
    
    std::string mangledName;
    std::string struct_name;

    bool instantiated = false;  /*!< True indicates that this function has been instantiated from a template */
    bool marked = false;        /*!< Indicates that the function has been treated by the front end */

    Position position;
    Type returnType;
    std::string functionName;
    std::vector<FunctionParameter> parameters;
    std::vector<Instruction> instructions;

    mutable long references = 0;
};

/*!
 * \typedef FunctionDeclaration
 * \brief The AST node for a function declaration.
 */
typedef Deferred<ASTFunctionDeclaration> FunctionDeclaration; 

} //end of ast

} //end of eddic

//Adapt the struct for the AST
BOOST_FUSION_ADAPT_STRUCT(
    eddic::ast::FunctionDeclaration, 
    (eddic::ast::Position, Content->position)
    (eddic::ast::Type, Content->returnType)
    (std::string, Content->functionName)
    (std::vector<eddic::ast::FunctionParameter>, Content->parameters)
    (std::vector<eddic::ast::Instruction>, Content->instructions)
)

#endif

{'fraction_non_alphanumeric': 0.17691532258064516, 'fraction_numerical': 0.005544354838709678, 'mean_word_length': 4.6781115879828326, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 29, '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': '2537692', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1083, 'n_words': 299}