public Scope Clone() { var newDict = new Dictionary <string, Reference>(); foreach (var pair in identifiers) { newDict[pair.Key] = Compiler.Reserve(this); } return(new Scope(newDict)); }
public override Value Evaluate() { if (Compiler.Runtime) { Reference reference = Compiler.Identify(Name); if (reference == NullReference.Value) { reference = Compiler.Reserve(this); Compiler.SetAlias(Name, reference); } if (Compiler.PendingDot) { Compiler.PendingDot = false; Compiler.ExitScope(true); } reference.Identifier = Name; return(reference); } return(NoValue.Value); }