public IEnumerable <ExoAtom> Resolve(ExoBlock parent) { foreach (var item in Values) { yield return(item); } }
public string Serialize(ExoBlock parent) { TraceUtility.Check(this.CanBeVariable && parent == null, "Attempting to serialize a potential variable without a parent!"); if (CanBeVariable && parent.IsVariable(Value)) { return(parent.GetVariable(this.Value).Serialize(parent)); } return(this.Value); }
public IEnumerable <ExoAtom> Resolve(ExoBlock parent) { if (CanBeVariable) { if (parent.IsVariable(Value)) { yield return(parent.GetVariable(this.Value)); } else if (parent.IsFunction(Value)) { yield return(parent.GetFunction(this.Value)); } } }
public IEnumerable <ExoAtom> Resolve(ExoBlock parent) { var items = this.ValueCore.Resolve(parent); if (items != null && items.Any()) { if (items.Count() == 1 && items.First().IdentifiedType == ExoAtomType.pack) { var citems = items.First().Resolve(parent); foreach (var item in citems) { yield return(item); } } else { foreach (var item in items) { yield return(item); } } } }
public ExoFunction GetFunction(ExoBlock parent) { TraceUtility.Check(this.IdentifiedType != ExoAtomType.func, "Attempting to get the function from a non-func atom!"); return(((FuncValueCore)this.ValueCore).Value); }
public string Serialize(ExoBlock parent) { return(this.ValueCore.Serialize(parent)); }
public string Serialize(ExoBlock parent) { return(string.Join(" ", this.Values.Select(x => x.Serialize(parent)))); }
public string Serialize(ExoBlock parent) { return(string.Join(" ", this.Values.ToList())); }
public IEnumerable <ExoAtom> Resolve(ExoBlock parent) { yield break; }
public string Serialize(ExoBlock parent) { return(Value.Name); }