Change message send syntax from prefix "<<" to prefix "^"
This commit is contained in:
parent
09ee4046c1
commit
264df78e4d
|
@ -29,7 +29,7 @@ spawn named 'driver-timer/PeriodicTick' {
|
|||
let finish = Dataspace.backgroundTask();
|
||||
on start {
|
||||
handle = setInterval(Dataspace.wrapExternal(() => {
|
||||
<< PeriodicTick(intervalMS);
|
||||
^ PeriodicTick(intervalMS);
|
||||
}, intervalMS));
|
||||
}
|
||||
on stop {
|
||||
|
|
|
@ -37,7 +37,7 @@ spawn named 'box' {
|
|||
spawn named 'client' {
|
||||
on asserted Protocol.BoxState($v) {
|
||||
console.log('client sending SetBox', v + 1);
|
||||
<< Protocol.SetBox(v + 1);
|
||||
^ Protocol.SetBox(v + 1);
|
||||
}
|
||||
|
||||
on retracted Protocol.BoxState(_) {
|
||||
|
|
|
@ -23,13 +23,13 @@ const N = 100000;
|
|||
|
||||
spawn {
|
||||
on start {
|
||||
<< 0;
|
||||
^ 0;
|
||||
}
|
||||
on message $v {
|
||||
if (v === N) {
|
||||
Dataspace.currentFacet().stop(() => { });
|
||||
} else {
|
||||
<< v + 1;
|
||||
^ v + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ export function SyndicateTypeDefinition(node) {
|
|||
}
|
||||
|
||||
export function MessageSendStatement(node) {
|
||||
this.token("<<");
|
||||
this.token("^");
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
this.semicolon();
|
||||
|
|
|
@ -54,8 +54,8 @@ export default class SyndicateParser extends _original_Parser {
|
|||
let previousError = null;
|
||||
|
||||
switch (this.state.type) {
|
||||
case tt.bitShift:
|
||||
if (this.hasPlugin("syndicate") && (this.state.value === "<<")) {
|
||||
case tt.bitwiseXOR:
|
||||
if (this.hasPlugin("syndicate")) {
|
||||
let result = this.withBacktracking(
|
||||
() => {
|
||||
this.next();
|
||||
|
|
Loading…
Reference in New Issue