From f918675c8b11adb80a83000a3a984e4ff3bdcf1b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 23 Oct 2016 19:45:36 -0700 Subject: 3569 Update syntax highlighting to not color numeric locations like literals. --- html/084console.mu.html | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'html/084console.mu.html') diff --git a/html/084console.mu.html b/html/084console.mu.html index 42938cfe..9271231a 100644 --- a/html/084console.mu.html +++ b/html/084console.mu.html @@ -61,8 +61,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color def new-fake-console events:&:@:event -> result:&:console [ local-scope load-ingredients - result:&:console <- new console:type - *result <- put *result, events:offset, events + result:&:console <- new console:type + *result <- put *result, events:offset, events ] def read-event console:&:console -> result:event, found?:bool, quit?:bool, console:&:console [ @@ -70,22 +70,22 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color load-ingredients { break-unless console - current-event-index:num <- get *console, current-event-index:offset - buf:&:@:event <- get *console, events:offset + current-event-index:num <- get *console, current-event-index:offset + buf:&:@:event <- get *console, events:offset { - max:num <- length *buf - done?:bool <- greater-or-equal current-event-index, max + max:num <- length *buf + done?:bool <- greater-or-equal current-event-index, max break-unless done? - dummy:&:event <- new event:type + dummy:&:event <- new event:type return *dummy, 1/found, 1/quit } - result <- index *buf, current-event-index - current-event-index <- add current-event-index, 1 - *console <- put *console, current-event-index:offset, current-event-index + result <- index *buf, current-event-index + current-event-index <- add current-event-index, 1 + *console <- put *console, current-event-index:offset, current-event-index return result, 1/found, 0/quit } switch # real event source is infrequent; avoid polling it too much - result:event, found?:bool <- check-for-interaction + result:event, found?:bool <- check-for-interaction return result, found?, 0/quit ] @@ -95,11 +95,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color def read-key console:&:console -> result:char, found?:bool, quit?:bool, console:&:console [ local-scope load-ingredients - x:event, found?:bool, quit?:bool, console <- read-event console - return-if quit?, 0, found?, quit? - return-unless found?, 0, found?, quit? - c:char, converted?:bool <- maybe-convert x, text:variant - return-unless converted?, 0, 0/found, 0/quit + x:event, found?:bool, quit?:bool, console <- read-event console + return-if quit?, 0, found?, quit? + return-unless found?, 0, found?, quit? + c:char, converted?:bool <- maybe-convert x, text:variant + return-unless converted?, 0, 0/found, 0/quit return c, 1/found, 0/quit ] @@ -107,22 +107,22 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope load-ingredients { - c:char, found?:bool, quit?:bool, console <- read-key console + c:char, found?:bool, quit?:bool, console <- read-key console loop-unless found? break-if quit? assert c, [invalid event, expected text] - screen <- print screen, c - chan <- write chan, c + screen <- print screen, c + chan <- write chan, c loop } - chan <- close chan + chan <- close chan ] def wait-for-event console:&:console -> console:&:console [ local-scope load-ingredients { - _, found?:bool <- read-event console + _, found?:bool <- read-event console loop-unless found? } ] @@ -136,7 +136,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color # fake consoles should be plenty fast; never skip return 0/false } - result <- interactions-left? + result <- interactions-left? ] -- cgit 1.4.1-2-gfad0