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)); } } }