<commit_before>using System.Diagnostics.CodeAnalysis;

namespace Parsley;

public delegate bool Parser<TValue>(ReadOnlySpan<char> input,
                                    ref int index,
                                    [NotNullWhen(true)] out TValue? value,
                                    [NotNullWhen(false)] out string? expectation);<commit_msg>Overload the Parser delegate type to support Parser<TItem, TValue> where TItem is the underlying item type (often char).<commit_after>using System.Diagnostics.CodeAnalysis;

namespace Parsley;

public delegate bool Parser<TValue>(
    ReadOnlySpan<char> input,
    ref int index,
    [NotNullWhen(true)] out TValue? value,
    [NotNullWhen(false)] out string? expectation);

public delegate bool Parser<TItem, TValue>(
    ReadOnlySpan<TItem> input,
    ref int index,
    [NotNullWhen(true)] out TValue? value,
    [NotNullWhen(false)] out string? expectation);
{'fraction_non_alphanumeric': 0.088139281828074, 'fraction_numerical': 0.0, 'mean_word_length': 3.088888888888889, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '77053', 'n_tokens_mistral': 244, 'n_tokens_neox': 242, 'n_words': 75}