-
Notifications
You must be signed in to change notification settings - Fork 325
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
[c++] Remove duplicated code in DynamicParser #737
[c++] Remove duplicated code in DynamicParser #737
Conversation
cpp/inc/bond/core/parser.h
Outdated
@@ -522,6 +491,13 @@ class DynamicParser | |||
else | |||
return detail::BasicTypeField(id, schema<Unknown>::type::metadata, type, BindUnknownField(transform), _input); | |||
} | |||
|
|||
|
|||
void ReadFieldEndBegin(BondDataType& type, uint16_t& id) |
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.
ReadSubsequentField?
// 2) We parsed only part of the hierarchy because that was what | ||
// the transform "expected". | ||
// | ||
// In both cases we emit remaining fields as unknown |
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.
There's a bug here that we probably should fix before refactoring. If we're parsing and we detect that we're in an unexpected hierarchy depth, that should cause serialization--and perhaps other transforms--to fail.
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.
Why do you think that needs to be fixed before this change? Also won't the fix likely be in detail::ParserInheritance
?
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.
Take a look at issue #742 for the details of the problem.
No description provided.