|
@@ -98,17 +98,20 @@ Element function exec(first_instr : Element):
|
|
|
// after the if conditional, we append a return of an empty element, as we need a return at the end
|
|
|
// returns in the code are therefore allowed (and will be the return value), but not necessarily
|
|
|
Element n
|
|
|
- n = create_node()
|
|
|
- dict_add(n, "params", create_node())
|
|
|
Element exec_if
|
|
|
- exec_if = create_value(!if)
|
|
|
Element exec_const_true
|
|
|
+ Element exec_return
|
|
|
+
|
|
|
+ n = create_node()
|
|
|
+ exec_if = create_value(!if)
|
|
|
exec_const_true = create_value(!constant)
|
|
|
+ exec_return = create_value(!return)
|
|
|
+
|
|
|
+ dict_add(n, "params", create_node())
|
|
|
dict_add(exec_const_true, "node", create_value(True))
|
|
|
dict_add(exec_if, "cond", exec_const_true)
|
|
|
dict_add(exec_if, "then", first_instr)
|
|
|
dict_add(n, "body", exec_if)
|
|
|
- Element exec_return
|
|
|
- exec_return = create_value(!return)
|
|
|
dict_add(exec_if, "next", exec_return)
|
|
|
+
|
|
|
return n()
|