mbeckerle commented on code in PR #987:
URL: https://github.com/apache/daffodil/pull/987#discussion_r1911243285


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/parsers/Parser.scala:
##########
@@ -227,26 +227,47 @@ abstract class CombinatorParser(override val context: 
RuntimeData)
   extends Parser
   with CombinatorProcessor
 
-final class SeqCompParser(context: RuntimeData, val childParsers: 
Vector[Parser])
-  extends CombinatorParser(context) {
+final class SeqCompParser(
+  context: RuntimeData,
+  val childParsers: Vector[Parser],
+) extends CombinatorParser(context) {
   override lazy val runtimeDependencies = Vector()
   override def childProcessors = childParsers
 
   override def nom = "seq"
 
-  val numChildParsers = childParsers.size
+  val assertDiscrimExpressions = childParsers.collect { case ae: 
AssertExpressionEvaluationParser => ae }
+  val discrimExpressions = assertDiscrimExpressions.filter { _.discrim }
+  val assertExpressions = assertDiscrimExpressions.filterNot { _.discrim }
+  val nonAssertChildren = childParsers.diff(assertExpressions)

Review Comment:
   There's a base class shared between discriminators and regular asserts. 
They're both a kind of assertion. This scala code may be using that terminology 
so nonAssertChildren may also mean no discriminators. 
   



-- 
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]

Reply via email to