重写脚本解释器的实现,提高其可读性。

This commit is contained in:
fengjiayi
2025-07-13 17:34:03 +08:00
parent 6141d2c1c1
commit 01ab905155
42 changed files with 1747 additions and 715 deletions

View File

@@ -174,6 +174,15 @@ namespace Serein.Script
return nextToken; // 返回下一个 token
}
/// <summary>
/// 重置Lexer
/// </summary>
public void Reset()
{
this._row = 0;
this._index = 0;
}
/// <summary>
/// 根据 token 重置Lexer
/// </summary>
@@ -184,6 +193,7 @@ namespace Serein.Script
this._index = token.StartIndex;
}
internal Token NextToken()
{