babelsberg/babelsberg-js — pull request #12 by timfel (2014-11-20 03:18:12+00:00)
Title: Source Transformation for assert and trigger

For the continous assertions, I would suggest the same transformation as with `always`:
```javascript
assert: {
area.contains(pt)
}
```
(own keyword, because the semantics are different)

For triggers, I think the most natural way to write this in JavaScript would be:
```javascript
(function() {
return area.contains(pt);
}).triggers(function() {
foo();
this.disable();
});
```
Don't know, if that is possible.
If we want to be consistent with `always` and `once`:
```javascript
trigger: {
callback: function() {
foo();
this.disable();
}
area.contains(pt)
}
```
So the `callback` is simply passed as another argument in the `opts` object to `bbb.trigger`.The drawback of this is in my opinion that one can hardly distinguish between condition and callback. But that would be fine at the moment.