feat: 正则词法识别器 (#1)
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>
This commit is contained in:
17
CanonSharp.Common/Abstractions/ISourceReader.cs
Normal file
17
CanonSharp.Common/Abstractions/ISourceReader.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user