cyber
cyber copied to clipboard
Implement Match block range case.
The matching example from Docs throws an error in the online playground.
val = 1000
match val:
0..100: print 'at or between 0 and 99'
100: print 'val is 100'
200:
print 'val is 200'
300, 400:
print 'combined case'
else:
print 'val is {val}'
The error I get is:
ParseError: Expected comma or colon.
main:3:6:
0..100: print 'at or between 0 and 99'
^
The match block was only recently implemented and doesn't handle the range case atm.