mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-22 00:56:34 +08:00
为Serein.Script增加类型分析,增加了更加详细的Number类型节点,优化了对象节点的链式表达式,修复了Lexer分析词法时,部分Token代码属性错误的问题。
This commit is contained in:
@@ -11,8 +11,19 @@ namespace Serein.Script.Node
|
||||
/// </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);
|
||||
|
||||
Reference in New Issue
Block a user