using CanonSharp.Combinator.Abstractions;
namespace CanonSharp.Combinator.Parsers.Bases;
///
/// 修正?解析器
/// 感觉是一种递归的高级实现?
///
///
///
///
internal sealed class FixParser : IParser
{
private readonly IParser _parser;
public FixParser(Func, IParser> func)
{
_parser = func(this);
}
public IParseResult Run(TState state,
Func, IParseResult> continuation)
where TState : IReadState
=> _parser.Run(state, continuation);
}