Closed morganholly closed 2 years ago
I forgot that last time, but of
is an binary operator too 😄.
https://nim-lang.org/docs/manual.html#types-tuples-and-object-types
oops. well i’ll work on the regex some more later today. i have an idea of how it will work, hopefully it’s right.
@RSDuck is it possible to put a case expression in an if/when/elif? it seems to not work, i'm getting errors from the extension, but if it does the regex i came up with wouldn't work there.
oh im going to have to create a new PR right, i was confused when my commit didn't show up here
@RSDuck is it possible to put a case expression in an if/when/elif? it seems to not work, i'm getting errors from the extension, but if it does the regex i came up with wouldn't work there.
yes it's possible like this:
if (case range[0..1](1)
of 0: false
of 1: true):
echo "miauz"
does it require the parens?
I think yes, I cannot get it to work without them, though I'm not 100% sure.
Not at my computer, but I'm pretty sure it'dt be possible to do similar things in a bracket expression that evaluates to an array index for lookup.
Basically the nesting could be achieved in a few ways.
this was easier than trying to rebase