diff --git a/Source/EnvelopeParserTest.h b/Source/EnvelopeParserTest.h index a601ded..a1d953b 100644 --- a/Source/EnvelopeParserTest.h +++ b/Source/EnvelopeParserTest.h @@ -328,7 +328,6 @@ public: expect(result30.valueAt(1) == 2); expect(result30.loopStartIndex == 0); expect(result30.releaseSequenceStartIndex == 1); - expect(error = kParseWarningPreRepeatSegmentEmpty); beginTest ("Empty segment warning(in-repeat)"); error = kParseErrorNone; diff --git a/Source/FrameSequenceParseErrors.cpp b/Source/FrameSequenceParseErrors.cpp index 3e7cd37..517ed51 100644 --- a/Source/FrameSequenceParseErrors.cpp +++ b/Source/FrameSequenceParseErrors.cpp @@ -14,10 +14,6 @@ String getParseErrorString (ParseError err, int minValue, int maxValue) { switch (err) { - case kParseWarningPreRepeatSegmentEmpty: - return TRANS ("Main body of the sequence is empty"); - break; - case kParseWarningRepeatSegmentEmpty: return TRANS ("Repeat section is empty"); break; @@ -26,6 +22,10 @@ String getParseErrorString (ParseError err, int minValue, int maxValue) return TRANS ("Release section is empty"); break; + case kParseErrorPreReleaseSegmentEmpty: + return TRANS ("Main body of the sequence is empty"); + break; + case kParseErrorDuplicatedReleaseDelimiter: return TRANS ("You cannot use \"|\" more than once"); break; diff --git a/Source/FrameSequenceParseErrors.h b/Source/FrameSequenceParseErrors.h index db6ca3a..e4b4485 100644 --- a/Source/FrameSequenceParseErrors.h +++ b/Source/FrameSequenceParseErrors.h @@ -15,10 +15,10 @@ enum ParseError { kParseErrorNone = 0, kParseErrorLevelWarning, - kParseWarningPreRepeatSegmentEmpty, kParseWarningRepeatSegmentEmpty, kParseWarningReleaseSegmentEmpty, kParseErrorLevelFatal, + kParseErrorPreReleaseSegmentEmpty, kParseErrorDuplicatedReleaseDelimiter, kParseErrorDuplicatedOpenBracket, kParseErrorDuplicatedCloseBracket, diff --git a/Source/FrameSequenceParser.cpp b/Source/FrameSequenceParser.cpp index d1f4350..fb00c34 100644 --- a/Source/FrameSequenceParser.cpp +++ b/Source/FrameSequenceParser.cpp @@ -438,9 +438,6 @@ FrameSequence FrameSequenceParser::parse (const String& input, { return fs; } - if (sequence.size() == 0) { - *error = kParseWarningPreRepeatSegmentEmpty; - } fs.sequence = sequence; fs.sequence.reserve (1000); @@ -470,6 +467,10 @@ FrameSequence FrameSequenceParser::parse (const String& input, // Set repeatEndIndex according to current working frameSequence length fs.releaseSequenceStartIndex = (int)fs.sequence.size(); } + + if (fs.sequence.size() == 0) { + *error = kParseErrorPreReleaseSegmentEmpty; + } if (hasRelease) // If release exists: {