jackfiled
3ed8bf5d36
All checks were successful
Run unit test / Unit-Test (push) Successful in 41s
Reviewed-on: https://git.bupt-hpc.cn/jackfiled/CanonSharp/pulls/2 Co-authored-by: jackfiled <xcrenchangjun@outlook.com> Co-committed-by: jackfiled <xcrenchangjun@outlook.com>
27 lines
707 B
C#
27 lines
707 B
C#
namespace CanonSharp.Combinator.Abstractions;
|
|
|
|
/// <summary>
|
|
/// 输入流的读取状态
|
|
/// </summary>
|
|
/// <typeparam name="TToken">输入流元素类型</typeparam>
|
|
public interface IReadState<out TToken>
|
|
{
|
|
public TToken Current { get; }
|
|
|
|
public bool HasValue { get; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 输入流的读取状态
|
|
/// </summary>
|
|
/// <typeparam name="TToken">输入流元素类型</typeparam>
|
|
/// <typeparam name="TState">下一个读取状态的类型</typeparam>
|
|
public interface IReadState<out TToken, TState> : IReadState<TToken>, IEquatable<TState>
|
|
where TState : IReadState<TToken, TState>
|
|
{
|
|
/// <summary>
|
|
/// 下一个读取状态
|
|
/// </summary>
|
|
TState Next { get; }
|
|
}
|