Browse Source

Fix AL2PY code to compile again

Yentl Van Tendeloo 7 years ago
parent
commit
839e0f1df5
1 changed files with 4 additions and 4 deletions
  1. 4 4
      models/AL_to_py.alc

+ 4 - 4
models/AL_to_py.alc

@@ -230,10 +230,10 @@ Boolean function main(model : Element):
 		code = code + code_print(function_element, 1)
 
 	log("Finding initial function...")
-	initial_function = set_pop(allInstances(model, "AL/Initial"))
-	initial_function = set_pop(allAssociationDestinations(model, function, "AL/initial_funcdef"))
-	log("Initial function: " + initial_function)
-	code = code + "main = func_" + initial_function + "\n"
+	function = set_pop(allInstances(model, "AL/Initial"))
+	function = set_pop(allAssociationDestinations(model, function, "AL/initial_funcdef"))
+	log("Initial function: " + function)
+	code = code + "main = func_" + function + "\n"
 
 	// Found the main function, though we only have the name of the function to assign...
 	// What we can do is reassign main to that function!