about summary refs log tree commit diff stats
path: root/edit/009-sandbox-test.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-22 12:08:10 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-22 12:08:10 -0700
commitada5eb55cb185edf30dcac48b25cc485d44677ef (patch)
treee147838f053a582e33146ac4fc4ab30ac8434e0e /edit/009-sandbox-test.mu
parenta6deb48067f8049922f16ed3489896f7749fd39f (diff)
downloadmu-ada5eb55cb185edf30dcac48b25cc485d44677ef.tar.gz
3552
Stop requiring jump instructions to explicitly provide a ':label' type
for jump targets.

This has been a source of repeated confusion for my students:
  a) They'd add the ':label' to the label definition rather than the
  jump target (label use)
  b) They'd spend time thinking about whether the initial '+' prefix was
  part of the label name.

In the process I cleaned up a couple of things:

  - the space of names is more cleanly partitioned into labels and
    non-labels (clarifying that '_' and '-' are non-label prefixes)
  - you can't use label names as regular variables anymore
  - you can infer the type of a label just from its name
Diffstat (limited to 'edit/009-sandbox-test.mu')
-rw-r--r--edit/009-sandbox-test.mu4
1 files changed, 2 insertions, 2 deletions
diff --git a/edit/009-sandbox-test.mu b/edit/009-sandbox-test.mu
index 564c6cf9..fe9ef059 100644
--- a/edit/009-sandbox-test.mu
+++ b/edit/009-sandbox-test.mu
@@ -134,7 +134,7 @@ after <global-touch> [
     screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
     # no change in cursor
     show-screen screen
-    loop +next-event:label
+    loop +next-event
   }
 ]
 
@@ -197,7 +197,7 @@ after <render-sandbox-response> [
       break-unless response-is-expected?:bool
       row, screen <- render-text screen, sandbox-response, left, right, 2/green, row
     }
-    jump +render-sandbox-end:label
+    jump +render-sandbox-end
   }
 ]