|
@@ -432,12 +432,14 @@ Void function rewrite(host_model : Element, schedule_model : Element, RHS : Stri
|
|
|
func = get_func_AL_model(import_node(value))
|
|
|
result = func(host_model, new_mapping[label], mapping)
|
|
|
|
|
|
- if (has_value(result)):
|
|
|
+ if (element_eq(result, read_root())):
|
|
|
+ unset_attribute(host_model, new_mapping[label], string_substr(attribute, string_len("value_"), string_len(attribute) + 1))
|
|
|
+ elif (has_value(result)):
|
|
|
// New value defined, so assign!
|
|
|
instantiate_attribute(host_model, new_mapping[label], string_substr(attribute, string_len("value_"), string_len(attribute) + 1), result)
|
|
|
else:
|
|
|
- // Non-value return means to destroy the attribute!
|
|
|
- unset_attribute(host_model, new_mapping[label], string_substr(attribute, string_len("value_"), string_len(attribute) + 1))
|
|
|
+ // Try to interpret as code
|
|
|
+ instantiate_attribute_code(host_model, new_mapping[label], string_substr(attribute, string_len("value_"), string_len(attribute) + 1), result)
|
|
|
|
|
|
// Do the global action of each element
|
|
|
action = read_attribute(schedule_model, RHS_map[label], "action")
|