<commit_before>package awe;

#if macro
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.Type;
using haxe.macro.ComplexTypeTools;
using haxe.macro.TypeTools;
#end

typedef MType = haxe.macro.Type;

/**
	Raw data to be attached to an `Entity`. Should contain absolutely no logic
	and should be serializable. This will be automatically pooled or packed.
**/
#if !macro
@:autoBuild(awe.Component.AutoComponent.from())
#end
@:keepSub
interface Component {
	/**
		Retrieve the component type for this component. This can be used to
		determine how the component is stored. 
		@return The component type.
	*/
	public function getType(): ComponentType;
}
#if macro
class AutoComponent {
	static function exprPath(t: ComplexType): ExprOf<Class<Dynamic>> {
		return switch(t) {
			case TPath(path):
				var all = [path.name].concat(path.pack);
				var expr = macro $i{all.pop()};
				while(all.length > 0) {
					var curr = all.pop();
					expr = macro $expr.$curr;
				}<commit_msg>Un-clean up<commit_after>package awe;

#if macro
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.Type;
using haxe.macro.ComplexTypeTools;
using haxe.macro.ExprTools;
using haxe.macro.TypeTools;
using awe.util.MacroTools;
#end

typedef MType = haxe.macro.Type;

/**
	Raw data to be attached to an `Entity`. Should contain absolutely no logic
	and should be serializable. This will be automatically pooled or packed.
**/
#if !macro
@:autoBuild(awe.Component.AutoComponent.from())
#end
@:keepSub
interface Component {
	/**
		Retrieve the component type for this component. This can be used to
		determine how the component is stored. 
		@return The component type.
	*/
	public function getType(): ComponentType;
}
#if macro
class AutoComponent {
	static function exprPath(t: ComplexType): ExprOf<Class<Dynamic>> {
		return switch(t) {
			case TPath(path):
				var all = [path.name].concat(path.pack);
				var expr = macro $i{all.pop()};
				while(all.length > 0) {
					var curr = all.pop();
					expr = macro $expr.$curr;
				}
{'fraction_non_alphanumeric': 0.11623344776851398, 'fraction_numerical': 0.000980872976949485, 'mean_word_length': 4.012285012285012, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '2841344', 'n_tokens_mistral': 741, 'n_tokens_neox': 650, 'n_words': 211}