2024-12-20 23:39:29 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Serein.Script.Node
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 循环条件节点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class WhileNode : ASTNode
|
|
|
|
|
|
{
|
2025-07-11 20:52:21 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 循环条件值来源
|
|
|
|
|
|
/// </summary>
|
2024-12-20 23:39:29 +08:00
|
|
|
|
public ASTNode Condition { get; }
|
2025-07-11 20:52:21 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 循环中语句块
|
|
|
|
|
|
/// </summary>
|
2024-12-20 23:39:29 +08:00
|
|
|
|
public List<ASTNode> Body { get; }
|
|
|
|
|
|
public WhileNode(ASTNode condition, List<ASTNode> body) => (Condition, Body) = (condition, body);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|