|
@@ -10,7 +10,7 @@ class ModelBootstrapVisitor(Visitor):
|
|
|
def __init__(self, args):
|
|
|
Visitor.__init__(self, args)
|
|
|
model_name = [arg.split(":", 1)[1] for arg in args if arg.startswith("--modelname:")][0]
|
|
|
- self.code = "Void function instantiate_%s():\n" % model_name
|
|
|
+ self.code = "Void function initialize_%s():\n" % model_name
|
|
|
self.free_id = 0
|
|
|
self.names = set()
|
|
|
self.current_model = None
|
|
@@ -119,7 +119,7 @@ class ModelBootstrapVisitor(Visitor):
|
|
|
attr_optional = len(tree.get_children("OPTIONAL")) > 0
|
|
|
attr_type = children[1].get_text()
|
|
|
#self.constructors.extend(["model_define_attribute", self.current_model, self.current_element[-1], attr_name, attr_optional, attr_type])
|
|
|
- self.code += '\tmodel_define_attribute(%s, "%s", "%s", "%s", %s)\n' % (self.current_model, self.current_element[-1], attr_name, attr_optional, attr_type)
|
|
|
+ self.code += '\tmodel_define_attribute(%s, "%s", "%s", %s, "%s")\n' % (self.current_model, self.current_element[-1], attr_name, attr_optional, attr_type)
|
|
|
full_attribute_name = self.current_element[-1] + "_" + attr_name
|
|
|
|
|
|
if is_assign:
|