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; }
|
||
|
}
|