_Core/Lang/AST/Expressions/NamedParameterExpr.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
namespace ComLib.Lang
{
/// <summary>
/// Variable expression data
/// </summary>
public class NamedParamExpr : Expr
{
/// <summary>
/// The name of the expression.
/// </summary>
public string Name;
/// <summary>
/// The expression representing the value of the parameter..
/// </summary>
public Expr Value;
/// <summary>
/// Position of the named arg.
/// </summary>
public int Pos;
/// <summary>
/// Initialize
/// </summary>
public NamedParamExpr() : this(null, null)
{
}
/// <summary>
/// Initialize
/// </summary>
/// <param name="name">Variable name</param>
/// <param name="value">The expression representing the value of the parameter.</param>
public NamedParamExpr(string name, Expr value)
{
this.Name = name;
this.Value = value;
}
/// <summary>
/// Evaluate
/// </summary>
/// <returns></returns>
public override object DoEvaluate()
{
var result = this.Value == null ? null : this.Value.Evaluate();
后面还有 14 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
