- if "special" in attr:
- if not "init" in attr:
- warning("Node type %s has an attribute with a \"special\" entry but without \"init\"" % node.name)
- sys.exit(1)
-
- if attrs_with_special != 0:
- warning("Node type %s has more than one attribute with a \"special\" entry" % node.name)
- sys.exit(1)
-
- attrs_with_special += 1
-
- if "prefix" in attr["special"]:
- specialname = attr["special"]["prefix"] + node.name
- elif "suffix" in attr["special"]:
- specialname = node.name + attr["special"]["suffix"]
- else:
- error("Unknown special constructor type for node type %s" % node.name)
- sys.exit(1)
-
- specialconstrs.append(
- dict(
- constrname = specialname,
- attrname = attr["name"],
- value = attr["special"]["init"]
- )
- )
- elif "init" in attr: