From b51136defc2898c868e4a1b60025d5bb57347662 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 28 Jun 2024 10:44:07 +0100 Subject: def form for implicit scopes --- tests/letstar.out | 1 + tests/vars6.bth | 11 +++++++++++ tests/vars6.out | 8 ++++++++ tests/vars7.bth | 7 +++++++ tests/vars7.out | 2 ++ 5 files changed, 29 insertions(+) create mode 100644 tests/letstar.out create mode 100644 tests/vars6.bth create mode 100644 tests/vars6.out create mode 100644 tests/vars7.bth create mode 100644 tests/vars7.out (limited to 'tests') diff --git a/tests/letstar.out b/tests/letstar.out new file mode 100644 index 0000000..3d4c7bf --- /dev/null +++ b/tests/letstar.out @@ -0,0 +1 @@ +220 diff --git a/tests/vars6.bth b/tests/vars6.bth new file mode 100644 index 0000000..30d3851 --- /dev/null +++ b/tests/vars6.bth @@ -0,0 +1,11 @@ +(do + (let (a 100 b 200 c 300) (say b)) + (do + (let (a 100 b 200 c 300) (say b)) + (def x 99) + (say "hii") + (say x) + (let (a 100 b 200 c 300) (say b)) + (let (x 77) (say x)) + (say x)) + (let (a 100 b 200 c 300) (say b))) diff --git a/tests/vars6.out b/tests/vars6.out new file mode 100644 index 0000000..5d1335a --- /dev/null +++ b/tests/vars6.out @@ -0,0 +1,8 @@ +200 +200 +hii +99 +200 +77 +99 +200 diff --git a/tests/vars7.bth b/tests/vars7.bth new file mode 100644 index 0000000..6bcbace --- /dev/null +++ b/tests/vars7.bth @@ -0,0 +1,7 @@ +(do + (say (if (< 3 2) + "hii" + (do + (def x 100) + x))) + (let (a 100 b 200 c 300) (say b))) diff --git a/tests/vars7.out b/tests/vars7.out new file mode 100644 index 0000000..15c2ac3 --- /dev/null +++ b/tests/vars7.out @@ -0,0 +1,2 @@ +100 +200 -- cgit v1.2.3