|
@@ -94,6 +94,15 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ return functionify(model);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ var functionify = function functionify(model) {
|
|
|
|
|
+ for (var t in model.triggers) {
|
|
|
|
|
+ var trigger = model.triggers[t];
|
|
|
|
|
+ trigger.do = new Function("self", trigger.do);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return model;
|
|
return model;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -131,12 +140,14 @@
|
|
|
ast.Id.call(this, "System", id);
|
|
ast.Id.call(this, "System", id);
|
|
|
this.body = body;
|
|
this.body = body;
|
|
|
this.refs = refs;
|
|
this.refs = refs;
|
|
|
|
|
+ this.properties = {};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
Behavior: function Behavior(id, body, refs) {
|
|
Behavior: function Behavior(id, body, refs) {
|
|
|
ast.Id.call(this, "Behavior", id);
|
|
ast.Id.call(this, "Behavior", id);
|
|
|
this.body = body;
|
|
this.body = body;
|
|
|
this.refs = refs;
|
|
this.refs = refs;
|
|
|
|
|
+ this.properties = {};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
Interaction: function Interaction(type, body) {
|
|
Interaction: function Interaction(type, body) {
|