aboutsummaryrefslogtreecommitdiff
path: root/test/ranges.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-09 16:27:54 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-09 16:27:54 -0500
commit898bee15817573b5ab865a1dae7e52da310affa8 (patch)
treeb8531a828190997a63a1e1ef32f4aa568304e61c /test/ranges.tm
parent7a4f2e73addf6dfcde2a6b17b62b961608e556a0 (diff)
Introduce a `Match` struct to represent pattern matching results, which
improves the usability of a lot of the APIs. Also bugfix some issues with ranges.
Diffstat (limited to 'test/ranges.tm')
-rw-r--r--test/ranges.tm9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ranges.tm b/test/ranges.tm
index c611957f..0ff67c1a 100644
--- a/test/ranges.tm
+++ b/test/ranges.tm
@@ -1,5 +1,14 @@
func main():
+ >> r := 5:to(10):by(2)
+ = Range(first=5, last=10, step=2)
+ >> r.first
+ = 5
+ >> r.last
+ = 10
+ >> r.step
+ = 2
+
>> Range(1, 5) == 1:to(5)
= yes