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/090scenario_filesystem_test.mu.html | 82 ++++++++++++++++---------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'html/090scenario_filesystem_test.mu.html') diff --git a/html/090scenario_filesystem_test.mu.html b/html/090scenario_filesystem_test.mu.html index 4bb717c3..f82e26e0 100644 --- a/html/090scenario_filesystem_test.mu.html +++ b/html/090scenario_filesystem_test.mu.html @@ -36,22 +36,22 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario read-from-fake-file [ local-scope assume-resources [ - [a] <- [ + [a] <- [ |xyz| ] ] - contents:&:source:char <- start-reading resources, [a] - 1:char/raw <- read contents - 2:char/raw <- read contents - 3:char/raw <- read contents - 4:char/raw <- read contents - _, 5:bool/raw <- read contents + contents:&:source:char <- start-reading resources, [a] + 1:char/raw <- read contents + 2:char/raw <- read contents + 3:char/raw <- read contents + 4:char/raw <- read contents + _, 5:bool/raw <- read contents memory-should-contain [ - 1 <- 120 # x - 2 <- 121 # y - 3 <- 122 # z - 4 <- 10 # newline - 5 <- 1 # eof + 1 <- 120 # x + 2 <- 121 # y + 3 <- 122 # z + 4 <- 10 # newline + 5 <- 1 # eof ] ] @@ -59,71 +59,71 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope assume-resources [ ] - sink:&:sink:char, writer:num/routine <- start-writing resources, [a] - sink <- write sink, 120/x - sink <- write sink, 121/y + sink:&:sink:char, writer:num/routine <- start-writing resources, [a] + sink <- write sink, 120/x + sink <- write sink, 121/y close sink wait-for-routine writer - contents-read-back:text <- slurp resources, [a] - 10:bool/raw <- equal contents-read-back, [xy] + contents-read-back:text <- slurp resources, [a] + 10:bool/raw <- equal contents-read-back, [xy] memory-should-contain [ - 10 <- 1 # file contents read back exactly match what was written + 10 <- 1 # file contents read back exactly match what was written ] ] scenario write-to-fake-file-that-exists [ local-scope assume-resources [ - [a] <- [] + [a] <- [] ] - sink:&:sink:char, writer:num/routine <- start-writing resources, [a] - sink <- write sink, 120/x - sink <- write sink, 121/y + sink:&:sink:char, writer:num/routine <- start-writing resources, [a] + sink <- write sink, 120/x + sink <- write sink, 121/y close sink wait-for-routine writer - contents-read-back:text <- slurp resources, [a] - 10:bool/raw <- equal contents-read-back, [xy] + contents-read-back:text <- slurp resources, [a] + 10:bool/raw <- equal contents-read-back, [xy] memory-should-contain [ - 10 <- 1 # file contents read back exactly match what was written + 10 <- 1 # file contents read back exactly match what was written ] ] scenario write-to-existing-file-preserves-other-files [ local-scope assume-resources [ - [a] <- [] - [b] <- [ + [a] <- [] + [b] <- [ |bcd| ] ] - sink:&:sink:char, writer:num/routine <- start-writing resources, [a] - sink <- write sink, 120/x - sink <- write sink, 121/y + sink:&:sink:char, writer:num/routine <- start-writing resources, [a] + sink <- write sink, 120/x + sink <- write sink, 121/y close sink wait-for-routine writer - contents-read-back:text <- slurp resources, [a] - 10:bool/raw <- equal contents-read-back, [xy] - other-file-contents:text <- slurp resources, [b] - 11:bool/raw <- equal other-file-contents, [bcd + contents-read-back:text <- slurp resources, [a] + 10:bool/raw <- equal contents-read-back, [xy] + other-file-contents:text <- slurp resources, [b] + 11:bool/raw <- equal other-file-contents, [bcd ] memory-should-contain [ - 10 <- 1 # file contents read back exactly match what was written - 11 <- 1 # other files also continue to persist unchanged + 10 <- 1 # file contents read back exactly match what was written + 11 <- 1 # other files also continue to persist unchanged ] ] def slurp resources:&:resources, filename:text -> contents:text [ local-scope load-ingredients - source:&:source:char <- start-reading resources, filename - buf:&:buffer <- new-buffer 30/capacity + source:&:source:char <- start-reading resources, filename + buf:&:buffer <- new-buffer 30/capacity { - c:char, done?:bool, source <- read source + c:char, done?:bool, source <- read source break-if done? - buf <- append buf, c + buf <- append buf, c loop } - contents <- buffer-to-array buf + contents <- buffer-to-array buf ] -- cgit 1.4.1-2-gfad0