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

Improve enumerate macro #8819

Merged
merged 2 commits into from Aug 30, 2018
Merged

Improve enumerate macro #8819

merged 2 commits into from Aug 30, 2018

Conversation

Vindaar
Copy link
Contributor

@Vindaar Vindaar commented Aug 30, 2018

After discussion in irc about issue #8818 (https://irclogs.nim-lang.org/30-08-2018.html#15:54:55), the experimental enumerate macro was proposed as a workaround.

This PR wraps the example macro in the manual in a block to create a new scope to avoid polluting the calling scope with a bunch of (to be reused) variable names.

I left the test case untouched and also fixed the line breaks for the case statement macro in the manual below, which previously (for me locally anyways) wouldn't produce a code block.

Previously line breaks were so weird that the code blocks were not created.
@Araq Araq merged commit 47c7fd0 into nim-lang:devel Aug 30, 2018
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.

None yet

2 participants