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

Expand macro section on repetition operators and syntax. #185

Closed
wants to merge 2 commits into from

Conversation

mdinger
Copy link
Contributor

@mdinger mdinger commented Jul 18, 2014

This is to give more details on how macro repetition works and to address #110 (comment).

//println!("{}", repeat_broken!(1u, 2u));

println!("{}", repeat_works!(1u));
// Would like it flat but it nests the results...
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should remove this before pushing full website. Just noted because it's not an ideal example.

@mdinger
Copy link
Contributor Author

mdinger commented Jul 19, 2014

Rebased to tip, separated examples, and enabled playpen. Other changes should be mostly minor.

Also, requested testing be supported in playpen: rust-lang/rust-playpen#32. It would be nice for the test suite example.

@mdinger
Copy link
Contributor Author

mdinger commented Jul 19, 2014

@japaric: I think Variable numbered arguments (variable_args) and Variable separator options (separators) seem similar. It might be worth combining them.

Also, it seems to me this fulfills your #110 checklist aside from Repetition and expansion awkwardly having 2 examples and the Generating generic test suite implementations not running on purpose...

If you had more in mind for expansion, you might want to update that list.

@@ -1,2 +1,3 @@
bin/*
stage/*
*~
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide gedit temp files. I can remove it if you want...I just added it because it might be a good idea.

[EDIT]
Let me know if you want this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove it

{ "id": "macros", "title": "macro_rules!", "children": null },
{ "id": "macros", "title": "macro_rules!", "children": [
{ "id": "arguments", "title": "Arguments and designators", "children": null },
{ "id": "variable_args", "title": "Variadic macros", "children": null },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove Variadic macros. See #185 (comment)

@steveklabnik
Copy link
Member

Same here, @mdinger

@mdinger mdinger closed this Dec 10, 2014
@mdinger
Copy link
Contributor Author

mdinger commented Dec 10, 2014

Oops. They are different. #200 is a followup to this.

@mdinger mdinger reopened this Dec 10, 2014
@mdinger
Copy link
Contributor Author

mdinger commented Dec 10, 2014

I'll rebase and reopen if I decide to work on this. Closing.

@mdinger mdinger closed this Dec 10, 2014
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