using CanonSharp.Combinator.Abstractions;
namespace CanonSharp.Combinator.Results;
///
/// 消息类型的失败解析结果
///
/// 解析失败的消息
/// 当前读取的状态
/// 输入流的类型
/// 读取状态类型
/// 解析结果的类型
internal sealed class FailedResultWithMessage(string message, TState state) : FailedResult
where TState : IReadState
{
public override IReadState State => state;
public override string Message => message;
public override FailedResult Convert()
{
return new FailedResultWithMessage(message, state);
}
}