From b884484c4378b39d125cb1ad078516ef00b48c52 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 7 May 2019 01:17:38 -0600 Subject: [PATCH] Test label and choice view count scoping. Close #41 Close #42 --- examples/labels/main.hank | 12 +++++++++--- examples/labels/test1.hlog | 4 +++- examples/labels/test2.hlog | 4 +++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/labels/main.hank b/examples/labels/main.hank index fc777c4..9085265 100644 --- a/examples/labels/main.hank +++ b/examples/labels/main.hank @@ -1,4 +1,6 @@ -- (start) +-> start +== start + Loop #: {start} A: {choice_a} B: {choice_b} @@ -7,7 +9,11 @@ C: {choice_c} * (choice_b) Choice B * (choice_c) {choice_b && choice_a} Choice C -> end -- -> start +- (gather) -> start -- (end) + +== end + +{start.choice_a} // Make sure labeled choices and gathers are scoped +{start.gather} It's over! \ No newline at end of file diff --git a/examples/labels/test1.hlog b/examples/labels/test1.hlog index 4f70ee3..7789ed9 100644 --- a/examples/labels/test1.hlog +++ b/examples/labels/test1.hlog @@ -17,4 +17,6 @@ B: 1 C: 0 * Choice C > 1: Choice C -It's over! +1 +2 +It's over! \ No newline at end of file diff --git a/examples/labels/test2.hlog b/examples/labels/test2.hlog index 56b717b..b8365eb 100644 --- a/examples/labels/test2.hlog +++ b/examples/labels/test2.hlog @@ -17,4 +17,6 @@ B: 1 C: 0 * Choice C > 1: Choice C -It's over! +1 +2 +It's over! \ No newline at end of file