public Binding ResolveBindingCell(string name, string kind, bool complainIfMissing) { Binding result = null; if (bindings.Contains(name)) { result = (Binding) bindings[name]; if (result.kind != kind) { throw new Exception("Expected binding kind "+kind+" for "+name+ "; got "+result.kind); } } else { if (complainIfMissing) { System.Console.Error.WriteLine(";; Warning: Uninitialized \"" + kind + "\" binding: " + name); } Binding b = new Binding(name, kind); bindings[name] = b; result = b; } return result; }
public UndefinedGlobalVariable(Binding var) : base("Undefined global "+var.name) { }