<commit_before>#include "interpreter.h"
#include "ptr_protect.h"
#include "function_obj.h"
#include "exception_helper.h"
#include "lexical.h"
#include <algorithm>
/**
 * Exception thrower for intepreter
 */
template<EXCEPTION T> void interpreterOops()
{
	__mathlibra__raise<T,INTERPRETER>();
}











	class interpreter;
template<typename T> void leak_check(util::object_stats<T> stats)
{
	std::cout << "COUNTABLE ASSERT RUNNING\n" << "STATS: \n" << "total: " << stats.get_total() << "\ncurrent: " << stats.get_current() << "\ndeleted: " << stats.get_deleted() << std::endl;
	if(stats.get_total() != stats.get_deleted())
	{
		interpreterOops<MEMORY_LEAK_ASSERT>();
	}	
}

void debug::check_tree_mem_leak()
{
#ifdef TYPE_MEM_TEST
	std::cout << "DEBUG LEAK CHECK\n\nNodes:\n";
	leak_check(util::object_stats<tree::nodeDataInterface>());
	std::cout << "\nTypes:\n";
	leak_check(util::object_stats<interface::type>());
#else
	std::cout << "This library was built with memory leak check disabled\n"
#endif<commit_msg>Added typename to function argument<commit_after>#include "interpreter.h"
#include "ptr_protect.h"
#include "function_obj.h"
#include "exception_helper.h"
#include "lexical.h"
#include <algorithm>
/**
 * Exception thrower for intepreter
 */
template<EXCEPTION T> void interpreterOops()
{
	__mathlibra__raise<T,INTERPRETER>();
}











	class interpreter;
template<typename T> void leak_check(typename util::object_stats<T> stats)
{
	std::cout << "COUNTABLE ASSERT RUNNING\n" << "STATS: \n" << "total: " << stats.get_total() << "\ncurrent: " << stats.get_current() << "\ndeleted: " << stats.get_deleted() << std::endl;
	if(stats.get_total() != stats.get_deleted())
	{
		interpreterOops<MEMORY_LEAK_ASSERT>();
	}	
}

void debug::check_tree_mem_leak()
{
#ifdef TYPE_MEM_TEST
	std::cout << "DEBUG LEAK CHECK\n\nNodes:\n";
	leak_check(util::object_stats<tree::nodeDataInterface>());
	std::cout << "\nTypes:\n";
	leak_check(util::object_stats<interface::type>());
#else
	std::cout << "This library was built with memory leak check disabled\n"
#endif
{'fraction_non_alphanumeric': 0.17450315075133302, 'fraction_numerical': 0.0, 'mean_word_length': 6.068493150684931, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1519587', 'n_tokens_mistral': 733, 'n_tokens_neox': 733, 'n_words': 140}