Added new parse warning message

This commit is contained in:
Takeshi Yokemura
2021-08-15 18:50:29 +09:00
parent 6583979011
commit 411d3b4868
4 changed files with 30 additions and 0 deletions

View File

@ -438,6 +438,9 @@ FrameSequence FrameSequenceParser::parse (const String& input,
{
return fs;
}
if (sequence.size() == 0) {
*error = kParseWarningPreRepeatSegmentEmpty;
}
fs.sequence = sequence;
fs.sequence.reserve (1000);
@ -456,6 +459,10 @@ FrameSequence FrameSequenceParser::parse (const String& input,
{
return fs;
}
if (repeatSeq.size() == 0) {
// Repeat section is defined but content is empty
*error = kParseWarningRepeatSegmentEmpty;
}
// Add the result to working frameSequence
fs.sequence.insert (fs.sequence.end(), repeatSeq.begin(), repeatSeq.end());
@ -477,6 +484,10 @@ FrameSequence FrameSequenceParser::parse (const String& input,
{
return fs;
}
if (releaseSeq.size() == 0) {
// Release section is defined but content is empty
*error = kParseWarningRepeatSegmentEmpty;
}
// Add the result to working frameSequence
fs.sequence.insert (fs.sequence.end(), releaseSeq.begin(), releaseSeq.end());