From ada5eb55cb185edf30dcac48b25cc485d44677ef Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 22 Oct 2016 12:08:10 -0700 Subject: 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 --- sandbox/009-sandbox-test.mu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sandbox/009-sandbox-test.mu') diff --git a/sandbox/009-sandbox-test.mu b/sandbox/009-sandbox-test.mu index f27b4a06..1c36a769 100644 --- a/sandbox/009-sandbox-test.mu +++ b/sandbox/009-sandbox-test.mu @@ -131,7 +131,7 @@ after [ screen <- update-cursor screen, current-sandbox, env # no change in cursor show-screen screen - loop +next-event:label + loop +next-event } ] @@ -194,7 +194,7 @@ after [ 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 } ] -- cgit 1.4.1-2-gfad0