mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
33 lines
846 B
C#
33 lines
846 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Serein.Script.Node
|
|
{
|
|
/// <summary>
|
|
/// 条件节点
|
|
/// </summary>
|
|
public class IfNode : ASTNode
|
|
{
|
|
/// <summary>
|
|
/// 条件来源
|
|
/// </summary>
|
|
public ASTNode Condition { get; }
|
|
|
|
/// <summary>
|
|
/// 条件为 true 时所执行的语句
|
|
/// </summary>
|
|
public List<ASTNode> TrueBranch { get; }
|
|
|
|
/// <summary>
|
|
/// 条件为 false 时所执行的语句
|
|
/// </summary>
|
|
public List<ASTNode> FalseBranch { get; }
|
|
public IfNode(ASTNode condition, List<ASTNode> trueBranch, List<ASTNode> falseBranch)
|
|
=> (Condition, TrueBranch, FalseBranch) = (condition, trueBranch, falseBranch);
|
|
}
|
|
|
|
}
|