From 4ee225b9ddc330459b53a562918040b87092259c Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 5 Nov 2018 14:30:27 +0000 Subject: [PATCH] Attempt to coax highlighting out of gfm --- README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 75c062a..db78d4d 100644 --- a/README.md +++ b/README.md @@ -44,23 +44,25 @@ are needed at run-time: Finally, create the main program file. Create a directory `src`, and 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' { - field this.counter = 0; - field this.deadline = +(new Date()); +spawn named 'ticker' { + field this.counter = 0; + field this.deadline = +(new Date()); - on start { console.log('ticker starting'); } - on stop { console.log('ticker stopping'); } + on start { console.log('ticker starting'); } + on stop { console.log('ticker stopping'); } - on asserted TimeLaterThan(this.deadline) { - this.counter++; - console.log('tick', new Date(), this.counter); - this.deadline += 1000; - } + on asserted TimeLaterThan(this.deadline) { + this.counter++; + console.log('tick', new Date(), this.counter); + this.deadline += 1000; + } - stop on (this.counter == 5); - } + stop on (this.counter == 5); +} +``` Now, compile the project: