useScope<T> method

void useScope<T>(
  1. Scope newScope,
  2. String command,
  3. void body(
    1. T x
    )
)

Enters the given scope, runs the body, and exits.

Implementation

void useScope<T>(Scope newScope, String command, void Function(T x) body) {
  run(command);
  scope.push(newScope);
  body(Activator.createInstance(T, arguments: [this]));
  run('exit');
  scope.pop();
}