Attempt to coax highlighting out of gfm

This commit is contained in:
Tony Garnock-Jones 2018-11-05 14:30:27 +00:00
parent e106f195c6
commit 4ee225b9dd
1 changed files with 15 additions and 13 deletions

View File

@ -44,23 +44,25 @@ are needed at run-time:
Finally, create the main program file. Create a directory `src`, and Finally, create the main program file. Create a directory `src`, and
then a file `src/index.js`: then a file `src/index.js`:
const { TimeLaterThan } = activate require("@syndicate-lang/driver-timer"); ```javascript
const { TimeLaterThan } = activate require("@syndicate-lang/driver-timer");
spawn named 'ticker' { spawn named 'ticker' {
field this.counter = 0; field this.counter = 0;
field this.deadline = +(new Date()); field this.deadline = +(new Date());
on start { console.log('ticker starting'); } on start { console.log('ticker starting'); }
on stop { console.log('ticker stopping'); } on stop { console.log('ticker stopping'); }
on asserted TimeLaterThan(this.deadline) { on asserted TimeLaterThan(this.deadline) {
this.counter++; this.counter++;
console.log('tick', new Date(), this.counter); console.log('tick', new Date(), this.counter);
this.deadline += 1000; this.deadline += 1000;
} }
stop on (this.counter == 5); stop on (this.counter == 5);
} }
```
Now, compile the project: Now, compile the project: