-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Setup path correctly after stream parsing a key:value object pair #2642
Conversation
@itchyny do you think that make sense? can't claim i understand the parsing code yet BTW do you have any 1.7 labeled issues you want help with? i've picked at few a random to look at |
a99a764
to
38f122d
Compare
I'll take a look at this (please forgive me for a few days). |
@itchyny no worries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
src/jv_parse.c
Outdated
@@ -299,7 +299,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) { | |||
p->output = JV_ARRAY(jv_copy(p->path), p->next); | |||
p->next = jv_invalid(); | |||
} | |||
p->path = jv_array_set(p->path, p->stacklen - 1, jv_true()); // ready for another name:value pair | |||
p->path = jv_array_set(p->path, p->stacklen - 1, jv_null()); // ready for another name:value pair |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the comment, key:value pair
is better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap updated and it seems to be to only place in the code where "name:value" was used
38f122d
to
8c9dd2b
Compare
Fixes jqlang#2378 (assert on parsing invalid object)
8c9dd2b
to
f3b578c
Compare
Rebased and changed to key:value |
@itchyny I noticed that "CI / dist" seems to run for PR:s, is missing |
Merge? Sorry dont have merge access |
I'll merge this, thank you. Yeah, I'll skip the dist job in #2652. |
👍 |
Fixes #2378 (assert on parsing invalid object)