Env constructor

Env()

Implementation class for the functions env[] and env[]=. Returns a singleton unless we are running in a Scope and a scopeKey for Env has been placed into the scope.

Implementation

factory Env() {
  if (Scope.hasScopeKey(scopeKey)) {
    return Scope.use(scopeKey);
  } else {
    return _self ??= Env._internal();
  }
}