Use semicolons instead of commas. #87

Merged
topecongiro merged 1 commit from semicolons into master 2017-03-24 00:42:04 -05:00
topecongiro commented 2017-03-22 11:19:50 -05:00 (Migrated from github.com)

Closes #65.

Closes #65.
dtolnay commented 2017-03-22 11:24:24 -05:00 (Migrated from github.com)

This is a bit more complicated because commas are treated as separators with an optional trailing separator, while semicolons need to be treated as terminators.

{ a, b, c } // ok
{ a, b, c, } // ok
{ a; b; c; } // ok
{ a; b; c } // not ok

The pairs of rules that look like this:

$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr);+
$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr);+;

need to be replaced by a single rule that looks like this:

$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr ;)+
This is a bit more complicated because commas are treated as separators with an optional trailing separator, while semicolons need to be treated as terminators. ```rust { a, b, c } // ok { a, b, c, } // ok { a; b; c; } // ok { a; b; c } // not ok ``` The pairs of rules that look like this: ```rust $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr);+ $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr);+; ``` need to be replaced by a single rule that looks like this: ```rust $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr ;)+ ```
topecongiro commented 2017-03-22 11:32:26 -05:00 (Migrated from github.com)

@dtolnay Thank you for your comment. I will change my PR accordingly.

@dtolnay Thank you for your comment. I will change my PR accordingly.
alexcrichton commented 2017-03-23 18:15:47 -05:00 (Migrated from github.com)

Looks great to me, thanks @topecongiro! Want to rebase and I'll merge?

Looks great to me, thanks @topecongiro! Want to rebase and I'll merge?
topecongiro commented 2017-03-23 19:33:29 -05:00 (Migrated from github.com)

@alexcrichton Thank you! Rebased.

@alexcrichton Thank you! Rebased.
Sign in to join this conversation.
No reviewers
No labels
bug
good first issue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-bitflags/bitflags!87
No description provided.