public virtual FormalArgument TryGetFormalArgument(string name) { if (name == null) { throw new ArgumentNullException("name"); } if (FormalArguments == null) { return(null); } return(FormalArguments.FirstOrDefault(i => i.Name == name)); }
/** Used by Template.Add() to Add args one by one w/o turning on full formal args definition signal */ public virtual void AddArgument(FormalArgument a) { if (FormalArguments == null) { FormalArguments = new List <FormalArgument>(); } a.Index = FormalArguments.Count; FormalArguments.Add(a); if (a.DefaultValueToken != null) { _numberOfArgsWithDefaultValues++; } }
public override Value Eval(Environment environment) { var proc = new UserDefinedProcedure(DefinedValue, false, FormalArguments.Select(v => v.Name).ToList()); return(new Closure(environment, proc)); }
public void AddArguement(Node node) { FormalArguments.Add(node); }