From 83fcebf3210b638d9f8248e0007e9f0c9804980a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 13 Jul 2015 20:53:41 -0700 Subject: 1778 --- html/060string.mu.html | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'html/060string.mu.html') diff --git a/html/060string.mu.html b/html/060string.mu.html index 45ff99e2..eb98cd88 100644 --- a/html/060string.mu.html +++ b/html/060string.mu.html @@ -13,14 +13,14 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; } body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } -.muScenario { color: #00af00; } +.muRecipe { color: #ff8700; } .Delimiter { color: #a04060; } +.muScenario { color: #00af00; } .Comment { color: #9090ff; } .Constant { color: #00a0a0; } .Special { color: #ff6060; } .CommentedCode { color: #6c6c6c; } .muControl { color: #c0a020; } -.muRecipe { color: #ff8700; } --> @@ -35,7 +35,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } # Some useful helpers for dealing with strings. recipe string-equal [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space a:address:array:character <- next-ingredient a-len:number <- length a:address:array:character/deref b:address:array:character <- next-ingredient @@ -138,7 +138,7 @@ container buffer [ ] recipe new-buffer [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space #? $print default-space:address:array:location, [ #? ] result:address:buffer <- new buffer:type @@ -154,7 +154,7 @@ container buffer [ ] recipe grow-buffer [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space in:address:buffer <- next-ingredient # double buffer size x:address:address:array:character <- get-address in:address:buffer/deref, data:offset @@ -177,7 +177,7 @@ container buffer [ ] recipe buffer-full? [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space in:address:buffer <- next-ingredient len:number <- get in:address:buffer/deref, length:offset s:address:array:character <- get in:address:buffer/deref, data:offset @@ -188,7 +188,7 @@ container buffer [ # in:address:buffer <- buffer-append in:address:buffer, c:character recipe buffer-append [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space in:address:buffer <- next-ingredient c:character <- next-ingredient len:address:number <- get-address in:address:buffer/deref, length:offset @@ -222,7 +222,7 @@ container buffer [ scenario buffer-append-works [ run [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space x:address:buffer <- new-buffer 3:literal s1:address:array:character <- get x:address:buffer/deref, data:offset x:address:buffer <- buffer-append x:address:buffer, 97:literal # 'a' @@ -274,7 +274,7 @@ container buffer [ scenario buffer-append-handles-backspace [ run [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space x:address:buffer <- new-buffer 3:literal x:address:buffer <- buffer-append x:address:buffer, 97:literal # 'a' x:address:buffer <- buffer-append x:address:buffer, 98:literal # 'b' @@ -291,7 +291,7 @@ container buffer [ # result:address:array:character <- integer-to-decimal-string n:number recipe integer-to-decimal-string [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space n:number <- next-ingredient # is it zero? { @@ -347,7 +347,7 @@ container buffer [ ] recipe buffer-to-array [ - default-space:address:array:character <- new location:type, 30:literal + new-default-space in:address:buffer <- next-ingredient { # propagate null buffer @@ -408,7 +408,7 @@ container buffer [ # result:address:array:character <- string-append a:address:array:character, b:address:array:character recipe string-append [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space # result = new character[a.length + b.length] a:address:array:character <- next-ingredient a-len:number <- length a:address:array:character/deref @@ -467,7 +467,7 @@ container buffer [ # replace underscores in first with remaining args # result:address:array:character <- interpolate template:address:array:character, ... recipe interpolate [ - default-space:array:address:location <- new location:type, 60:literal + new-default-space template:address:array:character <- next-ingredient # compute result-len, space to allocate for result tem-len:number <- length template:address:array:character/deref @@ -592,7 +592,7 @@ container buffer [ # result:boolean <- space? c:character recipe space? [ - default-space:array:address:location <- new location:type, 30:literal + new-default-space c:character <- next-ingredient # most common case first result:boolean <- equal c:character, 32:literal/space @@ -657,7 +657,7 @@ container buffer [ # result:address:array:character <- trim s:address:array:character recipe trim [ - default-space:array:address:location <- new location:type, 30:literal + new-default-space s:address:array:character <- next-ingredient len:number <- length s:address:array:character/deref # left trim: compute start @@ -766,7 +766,7 @@ container buffer [ # next-index:number <- find-next text:address:array:character, pattern:character recipe find-next [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space text:address:array:character <- next-ingredient pattern:character <- next-ingredient idx:number <- next-ingredient @@ -866,7 +866,7 @@ container buffer [ # like find-next, but searches for multiple characters # fairly dumb algorithm recipe find-substring [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space text:address:array:character <- next-ingredient pattern:address:array:character <- next-ingredient idx:number <- next-ingredient @@ -945,7 +945,7 @@ container buffer [ # result:boolean <- match-at text:address:array:character, pattern:address:array:character, idx:number # checks if substring matches at index 'idx' recipe match-at [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space text:address:array:character <- next-ingredient pattern:address:array:character <- next-ingredient idx:number <- next-ingredient @@ -1076,7 +1076,7 @@ container buffer [ # result:address:array:address:array:character <- split s:address:array:character, delim:character recipe split [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space s:address:array:character <- next-ingredient delim:character <- next-ingredient # empty string? return empty array @@ -1206,7 +1206,7 @@ container buffer [ # x:address:array:character, y:address:array:character <- split-first text:address:array:character, delim:character recipe split-first [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space text:address:array:character <- next-ingredient delim:character <- next-ingredient # empty string? return empty strings @@ -1241,7 +1241,7 @@ container buffer [ # result:address:array:character <- string-copy buf:address:array:character, start:number, end:number # todo: make this generic recipe string-copy [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space buf:address:array:character <- next-ingredient start:number <- next-ingredient end:number <- next-ingredient @@ -1301,7 +1301,7 @@ container buffer [ ] recipe min [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space x:number <- next-ingredient y:number <- next-ingredient { @@ -1313,7 +1313,7 @@ container buffer [ ] recipe max [ - default-space:address:array:location <- new location:type, 30:literal + new-default-space x:number <- next-ingredient y:number <- next-ingredient { -- cgit 1.4.1-2-gfad0