mbeckerle commented on code in PR #1569:
URL: https://github.com/apache/daffodil/pull/1569#discussion_r2403239955
##########
daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/parsers/SeparatedSequenceChildParseResultHelper.scala:
##########
@@ -126,17 +126,35 @@ trait SeparatedSequenceChildParseResultHelper extends
SequenceChildParseResultHe
): Unit = {
if ((sscb eq PositionalTrailingStrict)) {
- val resultToTest = priorResultOfTry
- resultToTest match {
- case ParseAttemptStatus.AbsentRep | ParseAttemptStatus.EmptyRep =>
- parser.PE(
- pstate,
- "Empty trailing optional elements are not allowed when
dfdl:separatorSuppressionPolicy='trailingEmptyStrict'"
- )
- case _ => // ok
+ if (checkTrailingOptionalElements(resultOfTry)) {
Review Comment:
Add comments to explain why you need to check first resultOfTry and then
priorResultOfTry. Capture some of the reasoning from our debug session.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]