public bool IsDefined(SymbolAtom sym) { if (IsDefinedHere(sym)) { return(true); } if (Parent == null) { return(false); } return(Parent.IsDefined(sym)); }
public ISExpression Lookup(SymbolAtom sym) { if (Data.ContainsKey(sym)) { return(Data[sym]); } if (Parent != null) { return(Parent.Lookup(sym)); } return(null); }
public bool Set(SymbolAtom sym, ISExpression sexpr) { if (IsDefinedHere(sym)) { DefineHere(sym, sexpr); return(true); } else if (Parent == null) { return(false); } else { return(Parent.Set(sym, sexpr)); } }
public void DefineHere(SymbolAtom sym, ISExpression sexpr) { Data[sym] = sexpr; }
public bool IsDefinedHere(SymbolAtom sym) { return(Data.ContainsKey(sym)); }