using CanonSharp.Combinator.Abstractions;
namespace CanonSharp.Combinator.Results;
///
/// 错误类型的失败解析结果
///
/// 输入流的类型
/// 输入流的读取类型
/// 实际的结果类型
internal sealed class FailedResultWithError(TState state) : FailedResult
where TState : IReadState
{
public override IReadState State => state;
public override string Message => $"Unexpected state: {state}.";
public override FailedResult Convert()
{
return new FailedResultWithError(state);
}
}