use of de.neemann.digital.hdl.hgs.HGSMap in project Digital by hneemann.
the class ReferenceToStruct method set.
@Override
public void set(Context context, Object value) throws HGSEvalException {
final HGSMap hgsMap = Value.toMap(parent.get(context));
if (hgsMap.hgsMapGet(name) == null)
throw new HGSEvalException("Value '" + name + "' not declared in struct!");
hgsMap.hgsMapPut(name, value);
}
use of de.neemann.digital.hdl.hgs.HGSMap in project Digital by hneemann.
the class ReferenceToStruct method declareVar.
@Override
public void declareVar(Context context, Object initial) throws HGSEvalException {
final HGSMap hgsMap = Value.toMap(parent.get(context));
if (hgsMap.hgsMapGet(name) != null)
throw new HGSEvalException("Value '" + name + "' redeclared in struct!");
hgsMap.hgsMapPut(name, initial);
}
Aggregations