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/edit/007-sandbox-delete.mu.html | 84 ++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'html/edit/007-sandbox-delete.mu.html') diff --git a/html/edit/007-sandbox-delete.mu.html b/html/edit/007-sandbox-delete.mu.html index ffae21e3..5fbf7441 100644 --- a/html/edit/007-sandbox-delete.mu.html +++ b/html/edit/007-sandbox-delete.mu.html @@ -38,10 +38,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope trace-until 100/app # trace too long assume-screen 100/width, 15/height - env:&:environment <- new-programming-environment screen, [], [] + env:&:environment <- new-programming-environment screen, [], [] # run a few commands assume-console [ - left-click 1, 80 + left-click 1, 80 type [divide-with-remainder 11, 3] press F4 type [add 2, 2] @@ -65,7 +65,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] # delete second sandbox by clicking on left edge of 'delete' button assume-console [ - left-click 7, 85 + left-click 7, 85 ] run [ event-loop screen, console, env @@ -83,7 +83,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] # delete first sandbox by clicking at right edge of 'delete' button assume-console [ - left-click 3, 99 + left-click 3, 99 ] run [ event-loop screen, console, env @@ -100,13 +100,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color after <global-touch> [ # support 'delete' button { - delete?:bool <- should-attempt-delete? click-row, click-column, env + delete?:bool <- should-attempt-delete? click-row, click-column, env break-unless delete? - delete?, env <- try-delete-sandbox click-row, env + delete?, env <- try-delete-sandbox click-row, env break-unless delete? hide-screen screen - screen <- render-sandbox-side screen, env, render - screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env + screen <- render-sandbox-side screen, env, render + screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env show-screen screen loop +next-event } @@ -117,66 +117,66 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope load-ingredients # are we below the sandbox editor? - click-sandbox-area?:bool <- click-on-sandbox-area? click-row, click-column, env + click-sandbox-area?:bool <- click-on-sandbox-area? click-row, click-column, env reply-unless click-sandbox-area?, 0/false # narrower, is the click in the columns spanning the 'copy' button? - first-sandbox:&:editor <- get *env, current-sandbox:offset + first-sandbox:&:editor <- get *env, current-sandbox:offset assert first-sandbox, [!!] - sandbox-left-margin:num <- get *first-sandbox, left:offset - sandbox-right-margin:num <- get *first-sandbox, right:offset - _, _, _, _, delete-button-left:num <- sandbox-menu-columns sandbox-left-margin, sandbox-right-margin - result <- within-range? click-column, delete-button-left, sandbox-right-margin + sandbox-left-margin:num <- get *first-sandbox, left:offset + sandbox-right-margin:num <- get *first-sandbox, right:offset + _, _, _, _, delete-button-left:num <- sandbox-menu-columns sandbox-left-margin, sandbox-right-margin + result <- within-range? click-column, delete-button-left, sandbox-right-margin ] def try-delete-sandbox click-row:num, env:&:environment -> clicked-on-delete-button?:bool, env:&:environment [ local-scope load-ingredients # identify the sandbox to delete, if the click was actually on the 'delete' button - sandbox:&:sandbox <- find-sandbox env, click-row + sandbox:&:sandbox <- find-sandbox env, click-row return-unless sandbox, 0/false - clicked-on-delete-button? <- copy 1/true - env <- delete-sandbox env, sandbox + clicked-on-delete-button? <- copy 1/true + env <- delete-sandbox env, sandbox ] def delete-sandbox env:&:environment, sandbox:&:sandbox -> env:&:environment [ local-scope load-ingredients - curr-sandbox:&:sandbox <- get *env, sandbox:offset - first-sandbox?:bool <- equal curr-sandbox, sandbox + curr-sandbox:&:sandbox <- get *env, sandbox:offset + first-sandbox?:bool <- equal curr-sandbox, sandbox { # first sandbox? pop break-unless first-sandbox? - next-sandbox:&:sandbox <- get *curr-sandbox, next-sandbox:offset - *env <- put *env, sandbox:offset, next-sandbox + next-sandbox:&:sandbox <- get *curr-sandbox, next-sandbox:offset + *env <- put *env, sandbox:offset, next-sandbox } { # not first sandbox? break-if first-sandbox? - prev-sandbox:&:sandbox <- copy curr-sandbox - curr-sandbox <- get *curr-sandbox, next-sandbox:offset + prev-sandbox:&:sandbox <- copy curr-sandbox + curr-sandbox <- get *curr-sandbox, next-sandbox:offset { assert curr-sandbox, [sandbox not found! something is wrong.] - found?:bool <- equal curr-sandbox, sandbox + found?:bool <- equal curr-sandbox, sandbox break-if found? - prev-sandbox <- copy curr-sandbox - curr-sandbox <- get *curr-sandbox, next-sandbox:offset + prev-sandbox <- copy curr-sandbox + curr-sandbox <- get *curr-sandbox, next-sandbox:offset loop } # snip sandbox out of its list - next-sandbox:&:sandbox <- get *curr-sandbox, next-sandbox:offset - *prev-sandbox <- put *prev-sandbox, next-sandbox:offset, next-sandbox + next-sandbox:&:sandbox <- get *curr-sandbox, next-sandbox:offset + *prev-sandbox <- put *prev-sandbox, next-sandbox:offset, next-sandbox } # update sandbox count - sandbox-count:num <- get *env, number-of-sandboxes:offset - sandbox-count <- subtract sandbox-count, 1 - *env <- put *env, number-of-sandboxes:offset, sandbox-count + sandbox-count:num <- get *env, number-of-sandboxes:offset + sandbox-count <- subtract sandbox-count, 1 + *env <- put *env, number-of-sandboxes:offset, sandbox-count # reset scroll if deleted sandbox was last { break-if next-sandbox - render-from:num <- get *env, render-from:offset - reset-scroll?:bool <- equal render-from, sandbox-count + render-from:num <- get *env, render-from:offset + reset-scroll?:bool <- equal render-from, sandbox-count break-unless reset-scroll? - *env <- put *env, render-from:offset, -1 + *env <- put *env, render-from:offset, -1 } ] @@ -185,7 +185,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color trace-until 100/app # trace too long assume-screen 100/width, 10/height # initialize environment - env:&:environment <- new-programming-environment screen, [], [] + env:&:environment <- new-programming-environment screen, [], [] render-all screen, env, render # create 2 sandboxes and scroll to second assume-console [ @@ -208,7 +208,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] # delete the second sandbox assume-console [ - left-click 6, 99 + left-click 6, 99 ] run [ event-loop screen, console, env @@ -230,7 +230,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color trace-until 100/app # trace too long assume-screen 100/width, 10/height # initialize environment - env:&:environment <- new-programming-environment screen, [], [] + env:&:environment <- new-programming-environment screen, [], [] render-all screen, env, render # create 2 sandboxes and scroll to second assume-console [ @@ -253,7 +253,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] # delete the second sandbox assume-console [ - left-click 2, 99 + left-click 2, 99 ] run [ event-loop screen, console, env @@ -275,7 +275,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color trace-until 100/app # trace too long assume-screen 100/width, 10/height # initialize environment - env:&:environment <- new-programming-environment screen, [], [] + env:&:environment <- new-programming-environment screen, [], [] render-all screen, env, render # create 2 sandboxes and scroll to second assume-console [ @@ -299,7 +299,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] # delete the second sandbox assume-console [ - left-click 2, 99 + left-click 2, 99 ] run [ event-loop screen, console, env @@ -322,7 +322,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color trace-until 100/app # trace too long assume-screen 100/width, 10/height # initialize environment - env:&:environment <- new-programming-environment screen, [], [] + env:&:environment <- new-programming-environment screen, [], [] render-all screen, env, render # create 2 sandboxes assume-console [ @@ -347,7 +347,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] # delete the second sandbox, then try to scroll down twice assume-console [ - left-click 3, 99 + left-click 3, 99 press page-down press page-down ] -- cgit 1.4.1-2-gfad0