declareVariable method
void
declareVariable(
- DartBlockArbiter arbiter,
- String variableName,
- DartBlockDataType dataType,
- DartBlockValue? value,
Declare a variable using the given name and optionally the initial value.
Implementation
void declareVariable(
DartBlockArbiter arbiter,
String variableName,
DartBlockDataType dataType,
DartBlockValue? value,
) {
/// If a variable with the same name is already declared, throw an Error.
if (getContainingEnvironment(variableName) != null) {
throw VariableAlreadyDeclaredException(variableName);
} else {
_memoryTypes[variableName] = dataType;
// if (value != null) {
_assignValue(arbiter, this, variableName, value);
// }
}
}