all method

Map<String, dynamic> all()

Returns a map containing all variables in the current context.

This method iterates through the variable stack and collects all the variables defined in the current context, merging them into a single map. The resulting map contains all the variables that are currently in scope.

Implementation

Map<String, dynamic> all() {
  Map<String, dynamic> result = {};
  for (var scope in _variableStack) {
    result.addAll(scope);
  }
  return result;
}