assignValueToVariable method
Assign a value to an existing variable based on its name.
Implementation
void assignValueToVariable(
DartBlockArbiter arbiter,
String variableName,
DartBlockValue? value,
) {
var containingEnvironment = getContainingEnvironment(variableName);
if (containingEnvironment != null) {
containingEnvironment._assignValue(
arbiter,
containingEnvironment,
variableName,
value,
);
} else {
/// If the variable with the given name is not yet declared, throw an Error.
throw VariableNotDeclaredException(variableName);
}
}