| java.lang.Object jsint.Environment
Environment | public class Environment (Code) | | Environments store mappings from symbols to locations.
At compile time, we can lookup to see if a symbol names a location,
and at run time we can get or set the value in a location.
author: Peter Norvig, Copyright 1998, peter@norvig.com, license author: subsequently modified by Jscheme project members author: licensed under zlib licence (see license.txt) |
GLOBAL | final public static Environment GLOBAL(Code) | | The global environment. All info is in the Symbols themselves. *
|
Environment | public Environment(Object vars, Object[] vals, Environment parent)(Code) | | Create an Environment with local variables and values, and a parent
Environment. *
|
lookup | public Object lookup(Symbol var, int up, int in, Object vars)(Code) | | Lookup the symbol in the environment. Return either a
LocalVariable a Symbol representing the global variable.
|
up | Environment up(int levels)(Code) | | Go up a specified number of levels in the parent chain. *
|
|
|