<commit_before>using System;
using System.Runtime.CompilerServices;

namespace ParsecSharp.Internal
{
    public static class Builder
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Parser<TToken, T> Create<TToken, T>(Func<IParsecStateStream<TToken>, Result<TToken, T>> function)
            => new Single<TToken, T>(function);

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Parser<TToken, TResult> ModifyResult<TToken, T, TResult>(this Parser<TToken, T> parser, Func<IParsecStateStream<TToken>, Fail<TToken, T>, Result<TToken, TResult>> fail, Func<IParsecStateStream<TToken>, Success<TToken, T>, Result<TToken, TResult>> success)
            => new ModifyResult<TToken, T, TResult>(parser, fail, success);
    }
}<commit_msg>add GetState to Internal for create native parser<commit_after>using System;
using System.Runtime.CompilerServices;

namespace ParsecSharp.Internal
{
    public static class Builder
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Parser<TToken, T> Create<TToken, T>(Func<IParsecStateStream<TToken>, Result<TToken, T>> function)
            => new Single<TToken, T>(function);

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Parser<TToken, TResult> ModifyResult<TToken, T, TResult>(this Parser<TToken, T> parser, Func<IParsecStateStream<TToken>, Fail<TToken, T>, Result<TToken, TResult>> fail, Func<IParsecStateStream<TToken>, Success<TToken, T>, Result<TToken, TResult>> success)
            => new ModifyResult<TToken, T, TResult>(parser, fail, success);

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Parser<TToken, IParsecStateStream<TToken>> GetState<TToken>()
            => Builder.Create<TToken, IParsecStateStream<TToken>>(state => Result.Success(state, state));
    }
}
{'fraction_non_alphanumeric': 0.11717921527041357, 'fraction_numerical': 0.0, 'mean_word_length': 4.9715189873417724, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 50, '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': '1771639', 'n_tokens_mistral': 583, 'n_tokens_neox': 563, 'n_words': 121}