about summary refs log tree commit diff stats
path: root/sandbox/001-editor.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-21 10:01:12 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-21 10:04:38 -0800
commit3f7eed6c600d6fb10ad6ae279f87541af69af9a2 (patch)
tree5b39a6c193697fd86746873d1252e180edbc43f7 /sandbox/001-editor.mu
parent167d0ca0d62f46598ea7385a11fa64ec935b5269 (diff)
downloadmu-3f7eed6c600d6fb10ad6ae279f87541af69af9a2.tar.gz
2467 - rename 'string' to 'text' everywhere
Not entirely happy with this. Maybe we'll find a better name. But at
least it's an improvement.

One part I *am* happy with is renaming string-replace to replace,
string-append to append, etc. Overdue, now that we have static dispatch.
Diffstat (limited to 'sandbox/001-editor.mu')
-rw-r--r--sandbox/001-editor.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/sandbox/001-editor.mu b/sandbox/001-editor.mu
index c74e6ac4..f84e388a 100644
--- a/sandbox/001-editor.mu
+++ b/sandbox/001-editor.mu
@@ -1,6 +1,6 @@
 ## the basic editor data structure, and how it displays text to the screen
 
-# temporary main for this layer: just render the given string at the given
+# temporary main for this layer: just render the given text at the given
 # screen dimensions, then stop
 recipe! main text:address:array:character [
   local-scope
@@ -13,7 +13,7 @@ recipe! main text:address:array:character [
   close-console
 ]
 
-scenario editor-initially-prints-string-to-screen [
+scenario editor-initially-prints-text-to-screen [
   assume-screen 10/width, 5/height
   run [
     1:address:array:character <- new [abc]
@@ -47,7 +47,7 @@ container editor-data [
 # creates a new editor widget and renders its initial appearance to screen
 #   top/left/right constrain the screen area available to the new editor
 #   right is exclusive
-recipe new-editor s:address:array:character, screen:address:screen, left:number, right:number -> result:address:editor-data [
+recipe new-editor s:address:array:character, screen:address:screen, left:number, right:number -> result:address:editor-data, screen:address:screen [
   local-scope
   load-ingredients
   # no clipping of bounds
@@ -224,13 +224,13 @@ recipe render screen:address:screen, editor:address:editor-data -> last-row:numb
   reply row, column, screen/same-as-ingredient:0, editor/same-as-ingredient:1
 ]
 
-recipe clear-line-delimited screen:address:screen, column:number, right:number [
+recipe clear-line-delimited screen:address:screen, column:number, right:number -> screen:address:screen [
   local-scope
   load-ingredients
   {
     done?:boolean <- greater-than column, right
     break-if done?
-    print-character screen, 32/space
+    screen <- print-character screen, 32/space
     column <- add column, 1
     loop
   }