Catch end-of-mapping event in ScalarMappingParser
This commit is contained in:
parent
68d0083ba8
commit
2f91e12296
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ ScalarMappingParser::~ScalarMappingParser()
|
|||
void
|
||||
ScalarMappingParser::HandleEvent(yaml_event_t& event)
|
||||
{
|
||||
if (event.type == YAML_MAPPING_END_EVENT) {
|
||||
SetDone(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mShouldExpectKey && event.type == YAML_SCALAR_EVENT) {
|
||||
HandleKeyEvent(std::string((char*)event.data.scalar.value,
|
||||
event.data.scalar.length));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue