christolliday / limn

Experimental cross platform GUI library
Other
404 stars 19 forks source link

style macro - make trailing comma optional #53

Closed RoelofSol closed 6 years ago

christolliday commented 6 years ago

Thanks for this, the only issue is it is too permissive (allows any number of trailing commas,,,,,,,,) I think the way this is usually done is to add an alternate macro branch that calls the first, as in:

    ( $style_type:ident { $( $field:ident: $value:expr ) , * } ) => {
        style!(style_type { $($field: $value)* })
    };

update with this I'll merge it

christolliday commented 6 years ago

looks good thanks!