Support gaining access to the ground object
This commit is contained in:
parent
b9aa833186
commit
a8b7de0d64
|
@ -86,8 +86,13 @@ var modifiedSourceActions = {
|
|||
return buildActor(ctorExp.asES5, block);
|
||||
},
|
||||
|
||||
NetworkStatement_ground: function(_ground, _network, block) {
|
||||
return 'new Syndicate.Ground(function () ' + block.asES5 + ').startStepping();';
|
||||
NetworkStatement_ground: function(_ground, _network, maybeId, block) {
|
||||
var code = 'new Syndicate.Ground(function () ' + block.asES5 + ').startStepping();';
|
||||
if (maybeId.numChildren === 1) {
|
||||
return 'var ' + maybeId.children[0].interval.contents + ' = ' + code;
|
||||
} else {
|
||||
return code;
|
||||
}
|
||||
},
|
||||
NetworkStatement_normal: function(_network, block) {
|
||||
return 'Syndicate.Network.spawn(new Network(function () ' + block.asES5 + '));';
|
||||
|
|
|
@ -18,8 +18,8 @@ Syndicate <: ES5 {
|
|||
| actor Block -- noConstructor
|
||||
|
||||
NetworkStatement
|
||||
= ground network Block -- ground
|
||||
| network Block -- normal
|
||||
= ground network identifier? Block -- ground
|
||||
| network Block -- normal
|
||||
|
||||
ActorFacetStatement
|
||||
= state FacetBlock until FacetStateTransitionBlock -- state
|
||||
|
|
|
@ -37,6 +37,7 @@ Ground.prototype.startStepping = function () {
|
|||
self.startStepping();
|
||||
}, 0);
|
||||
}
|
||||
return this; // because the syndicatec compiler chains startStepping after the ctor
|
||||
};
|
||||
|
||||
Ground.prototype.stopStepping = function () {
|
||||
|
|
Loading…
Reference in New Issue