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