Change message send syntax from prefix "<<" to prefix "^"

This commit is contained in:
Tony Garnock-Jones 2018-11-03 22:26:52 +00:00
parent 09ee4046c1
commit 264df78e4d
5 changed files with 7 additions and 7 deletions

View File

@ -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 {

View File

@ -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(_) {

View File

@ -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;
}
}
}

View File

@ -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();

View File

@ -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();