about summary refs log tree commit diff stats
path: root/sandbox
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-03-21 08:44:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-03-21 08:45:12 -0700
commit63513e9fdb400ee9319640ab6c3d03058a20df61 (patch)
tree29c081b7ba25fda0660dd53f60fd62ed211950d0 /sandbox
parentd35595fd7d8244c51cfbaf357f1d4214ca7bfeda (diff)
downloadmu-63513e9fdb400ee9319640ab6c3d03058a20df61.tar.gz
3806
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/001-editor.mu13
1 files changed, 4 insertions, 9 deletions
diff --git a/sandbox/001-editor.mu b/sandbox/001-editor.mu
index dab475fb..60042344 100644
--- a/sandbox/001-editor.mu
+++ b/sandbox/001-editor.mu
@@ -413,8 +413,7 @@ def get-color color:num, c:char -> color:num [
     starting-comment?:bool <- equal c, 35/#
     break-unless starting-comment?
     trace 90, [app], [switch color back to blue]
-    color <- copy 12/lightblue
-    jump +exit
+    return 12/lightblue
   }
   # if color is blue and next character is newline, switch color to white
   {
@@ -423,16 +422,14 @@ def get-color color:num, c:char -> color:num [
     ending-comment?:bool <- equal c, 10/newline
     break-unless ending-comment?
     trace 90, [app], [switch color back to white]
-    color <- copy 7/white
-    jump +exit
+    return 7/white
   }
   # if color is white (no comments) and next character is '<', switch color to red
   {
     break-unless color-is-white?
     starting-assignment?:bool <- equal c, 60/<
     break-unless starting-assignment?
-    color <- copy 1/red
-    jump +exit
+    return 1/red
   }
   # if color is red and next character is space, switch color to white
   {
@@ -440,11 +437,9 @@ def get-color color:num, c:char -> color:num [
     break-unless color-is-red?
     ending-assignment?:bool <- equal c, 32/space
     break-unless ending-assignment?
-    color <- copy 7/white
-    jump +exit
+    return 7/white
   }
   # otherwise no change
-  +exit
   return color
 ]