Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redo changes from #86/#90 #91

Merged
merged 1 commit into from
Apr 26, 2022
Merged

redo changes from #86/#90 #91

merged 1 commit into from
Apr 26, 2022

Conversation

morganholly
Copy link
Contributor

this was easier than trying to rebase

@saem saem merged commit a091dd4 into saem:main Apr 26, 2022
@morganholly morganholly deleted the patch-5 branch April 26, 2022 04:07
@RSDuck
Copy link
Contributor

RSDuck commented Apr 26, 2022

I forgot that last time, but of is an binary operator too 😄.

https://nim-lang.org/docs/manual.html#types-tuples-and-object-types

@morganholly
Copy link
Contributor Author

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.

@morganholly morganholly restored the patch-5 branch April 26, 2022 17:21
@morganholly
Copy link
Contributor Author

@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.

@morganholly
Copy link
Contributor Author

oh im going to have to create a new PR right, i was confused when my commit didn't show up here

@RSDuck
Copy link
Contributor

RSDuck commented Apr 26, 2022

@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"

@morganholly
Copy link
Contributor Author

does it require the parens?

@RSDuck
Copy link
Contributor

RSDuck commented Apr 26, 2022

I think yes, I cannot get it to work without them, though I'm not 100% sure.

@saem
Copy link
Owner

saem commented Apr 27, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants