Reviewed-on: https://git.bupt-hpc.cn/jackfiled/CanonSharp/pulls/1 Co-authored-by: jackfiled <xcrenchangjun@outlook.com> Co-committed-by: jackfiled <xcrenchangjun@outlook.com>
18 lines
393 B
C#
18 lines
393 B
C#
namespace CanonSharp.Common.Abstractions;
|
|
|
|
public interface ISourceReader
|
|
{
|
|
/// <summary>
|
|
/// 偷看一下下一个字符
|
|
/// </summary>
|
|
/// <param name="c">看到的下一个字符</param>
|
|
/// <returns></returns>
|
|
public bool TryPeek(out char c);
|
|
|
|
/// <summary>
|
|
/// 读取下一个字符
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public char Read();
|
|
}
|