mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 08:10:47 +08:00
重写脚本解释器的实现,提高其可读性。
This commit is contained in:
26
Serein.Script/Node/FlowControl/WhileNode.cs
Normal file
26
Serein.Script/Node/FlowControl/WhileNode.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.Script.Node.FlowControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 循环条件节点
|
||||
/// </summary>
|
||||
public class WhileNode : ASTNode
|
||||
{
|
||||
/// <summary>
|
||||
/// 循环条件值来源
|
||||
/// </summary>
|
||||
public ASTNode Condition { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 循环中语句块
|
||||
/// </summary>
|
||||
public List<ASTNode> Body { get; }
|
||||
public WhileNode(ASTNode condition, List<ASTNode> body) => (Condition, Body) = (condition, body);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user