<commit_before>package org.panda_lang.panda.framework.language.interpreter.pattern.token.wildcard.reader;

import org.jetbrains.annotations.Nullable;
import org.panda_lang.panda.framework.design.interpreter.token.Tokens;
import org.panda_lang.panda.framework.language.interpreter.pattern.token.TokenPattern;
import org.panda_lang.panda.framework.language.interpreter.pattern.token.extractor.TokenDistributor;

public class WildcardReaderCompiler {

    private final TokenPattern pattern;

    public WildcardReaderCompiler(TokenPattern pattern) {
        this.pattern = pattern;
    }

    public @Nullable Tokens extract(String data, TokenDistributor distributor) {
        return null;
    }

}<commit_msg>Compile wildcard using reader from TokenPattern<commit_after>package org.panda_lang.panda.framework.language.interpreter.pattern.token.wildcard.reader;

import org.jetbrains.annotations.Nullable;
import org.panda_lang.panda.framework.design.interpreter.token.Tokens;
import org.panda_lang.panda.framework.language.interpreter.pattern.token.TokenPattern;
import org.panda_lang.panda.framework.language.interpreter.pattern.token.extractor.TokenDistributor;

public class WildcardReaderCompiler {

    private final TokenPattern pattern;

    public WildcardReaderCompiler(TokenPattern pattern) {
        this.pattern = pattern;
    }

    public @Nullable Tokens extract(String data, TokenDistributor distributor) {
        for (WildcardReader wildcardReader : pattern.getWildcardReaders()) {
            if (!wildcardReader.match(data)) {
                continue;
            }

            return wildcardReader.read(data, distributor);
        }

        return null;
    }

}
{'fraction_non_alphanumeric': 0.08535862477771192, 'fraction_numerical': 0.0, 'mean_word_length': 4.177914110429448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7256281', 'n_tokens_mistral': 480, 'n_tokens_neox': 464, 'n_words': 77}