Skip to content

Fix trailing comma parsing in DeJson proc macro - #167

Open
tadeohepperle wants to merge 1 commit into
not-fl3:masterfrom
tadeohepperle:166-fix-proc-macros-for-de-json
Open

Fix trailing comma parsing in DeJson proc macro#167
tadeohepperle wants to merge 1 commit into
not-fl3:masterfrom
tadeohepperle:166-fix-proc-macros-for-de-json

Conversation

@tadeohepperle

Copy link
Copy Markdown
Contributor

fixes #166

Comment thread derive/src/parse.rs
let mut wraps = vec![];
let mut path = "(".to_owned();
while let Some(next_ty) = next_type(source) {
while next_eof(source).is_none() {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I would either make a special combinator ignoring eof for this or would add an explicit eof check at the end of this while loop.

I also feel like next_exact_punct(source, ","). might have tried to fix the same problem?

First reaction after first glad at the code, if you want I can take a shot on implementing it later.

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.

DeJson macro fails for tuple-like and struct-like enum variants with trailing commas

2 participants