diff --git a/Serein.Script/IScriptInvokeContext.cs b/Serein.Script/IScriptInvokeContext.cs
index c842a8a..3899098 100644
--- a/Serein.Script/IScriptInvokeContext.cs
+++ b/Serein.Script/IScriptInvokeContext.cs
@@ -8,15 +8,10 @@ namespace Serein.Script
public interface IScriptInvokeContext
{
- ///
- /// 是否该退出了(由 TokenSource 控制,用于响应外部发出停止信号)
- ///
- bool IsReturn { get; }
-
///
/// 是否需要提前返回(用于脚本中提前结束)
///
- bool IsNeedReturn { get; set; }
+ bool IsReturn { get; set; }
///
/// 是否严格检查 Null 值 (禁止使用 Null)
diff --git a/Serein.Script/Node/TypeNode.cs b/Serein.Script/Node/TypeNode.cs
index 6e1ca96..0c7705b 100644
--- a/Serein.Script/Node/TypeNode.cs
+++ b/Serein.Script/Node/TypeNode.cs
@@ -11,6 +11,9 @@ namespace Serein.Script.Node
///
public class TypeNode : ASTNode
{
+ ///
+ /// 类型名称
+ ///
public string TypeName { get; }
public TypeNode(string typeName)
diff --git a/Serein.Script/Node/UsingNode.cs b/Serein.Script/Node/UsingNode.cs
new file mode 100644
index 0000000..1853150
--- /dev/null
+++ b/Serein.Script/Node/UsingNode.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Serein.Script.Node
+{
+ internal class UsingNode : ASTNode
+ {
+ public string Namespace { get; }
+
+ public UsingNode(string @namespace)
+ {
+ Namespace = @namespace;
+ }
+
+ public override string ToString()
+ {
+ return $"using Namespace";
+ }
+ }
+}
diff --git a/Serein.Script/ScriptInvokeContext.cs b/Serein.Script/ScriptInvokeContext.cs
index 7ad1b15..100dd8b 100644
--- a/Serein.Script/ScriptInvokeContext.cs
+++ b/Serein.Script/ScriptInvokeContext.cs
@@ -21,11 +21,6 @@ namespace Serein.Script
///
private CancellationTokenSource _tokenSource = new CancellationTokenSource();
- ///
- /// 是否该退出了
- ///
- public bool IsReturn => _tokenSource.IsCancellationRequested;
-
///
/// 是否严格检查 Null 值 (禁止使用 Null)
///
@@ -34,7 +29,7 @@ namespace Serein.Script
///
/// 是否需要提前返回(用于脚本中提前结束)
///
- public bool IsNeedReturn { get; set; }
+ public bool IsReturn { get; set; }
///
diff --git a/Serein.Script/SereinScript.cs b/Serein.Script/SereinScript.cs
index 300ecb5..34497b6 100644
--- a/Serein.Script/SereinScript.cs
+++ b/Serein.Script/SereinScript.cs
@@ -5,7 +5,9 @@ using System.Reflection;
namespace Serein.Script
{
-
+ ///
+ /// Serein 脚本引擎
+ ///
public class SereinScript
{
///
@@ -14,10 +16,17 @@ namespace Serein.Script
public SereinScriptTypeAnalysis TypeAnalysis { get; } = new SereinScriptTypeAnalysis();
-
+ ///
+ /// 程序起始节点
+ ///
private ProgramNode? programNode;
-
+ ///
+ /// 执行脚本(静态方法)
+ ///
+ ///
+ ///
+ ///
public static Task