<commit_before>#ifndef THEWIZARDPLUSPLUS_WIZARD_PARSER_PARSER_AST_NODE_HEADER
#define THEWIZARDPLUSPLUS_WIZARD_PARSER_PARSER_AST_NODE_HEADER

#include "../vendor/better-enums/enum_strict.hpp"
#include <cstdint>
#include <string>
#include <vector>

namespace thewizardplusplus::wizard_parser::parser {

BETTER_ENUM(ast_node_type, std::uint8_t, sequence, nothing, eoi)

struct ast_node {
	std::string type;
	std::string value;
	std::vector<ast_node> children;
};

using ast_node_group = std::vector<ast_node>;

}
#endif<commit_msg>Add an offset to a node: add the `parser::ast_node::offset` field<commit_after>#ifndef THEWIZARDPLUSPLUS_WIZARD_PARSER_PARSER_AST_NODE_HEADER
#define THEWIZARDPLUSPLUS_WIZARD_PARSER_PARSER_AST_NODE_HEADER

#include "../vendor/better-enums/enum_strict.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include <optional>
#include <cstddef>

namespace thewizardplusplus::wizard_parser::parser {

BETTER_ENUM(ast_node_type, std::uint8_t, sequence, nothing, eoi)

struct ast_node {
	std::string type;
	std::string value;
	std::vector<ast_node> children;
	std::optional<std::size_t> offset;
};

using ast_node_group = std::vector<ast_node>;

}
#endif
{'fraction_non_alphanumeric': 0.11645569620253164, 'fraction_numerical': 0.0016877637130801688, 'mean_word_length': 8.966386554621849, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '2558043', 'n_tokens_mistral': 451, 'n_tokens_neox': 458, 'n_words': 76}