nice visualization
This commit is contained in:
parent
fecce51828
commit
e046f2f972
5 changed files with 35 additions and 9 deletions
|
|
@ -39,8 +39,11 @@ KINDS = ["nac", "lhs", "rhs"]
|
|||
# Phony name generator that raises an error if you try to use it :)
|
||||
class LHSNameGenerator:
|
||||
def __call__(self, type_name):
|
||||
if type_name == "GlobalCondition":
|
||||
return parser.DefaultNameGenerator()(type_name)
|
||||
raise Exception(f"Error: Object or link of type '{type_name}' does not have a name.\nAnonymous objects/links are not allowed in the LHS of a rule, because they can have unintended consequences. Please give all of the elements in the LHS explicit names.")
|
||||
|
||||
|
||||
# load model transformation rules
|
||||
def load_rules(state, get_filename, rt_mm_ramified, rule_names, check_conformance=True):
|
||||
rules = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue