gecko-dev/js/js2/java/Environment.java

30 строки
522 B
Java
Исходник Обычный вид История

1999-05-08 02:18:39 +04:00
import java.util.Hashtable;
class Environment {
JSScope scope = new JSScope("globals");
JSScope globalScope = scope;
1999-06-12 03:05:16 +04:00
void enterNewScope(JSScope newScope)
1999-06-12 03:05:16 +04:00
{
newScope.parent = scope;
scope = newScope;
}
void leaveScope()
{
scope = scope.parent;
1999-06-12 03:05:16 +04:00
}
1999-05-28 23:00:48 +04:00
1999-05-08 02:18:39 +04:00
String print()
{
StringBuffer result = new StringBuffer("Globals contents :\n");
result.append(scope.toString());
1999-05-08 02:18:39 +04:00
return result.toString();
}
1999-06-11 04:21:26 +04:00
JSValue resultValue;
1999-05-08 02:18:39 +04:00
}