olabusayoT commented on a change in pull request #326: Daffodil 2280 cleanup - 
removes backpointers and factory patterns no longer needed
URL: https://github.com/apache/incubator-daffodil/pull/326#discussion_r394482717
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/runtime1/TermRuntime1Mixin.scala
 ##########
 @@ -101,6 +110,91 @@ trait TermRuntime1Mixin { self: Term =>
 
   import PossibleNextElements._
 
+  /**
+   * Finds possible next streaming unparser elements for this term itself.
+   *
+   * Disregards any surrounding structure,
+   */
+  lazy val possibleThisTermNextStreamingUnparserElements: PossibleNextElements 
=
+    LV('possibleThisTermNextStreamingUnparserElements) {
+      possibleThisTermNextStreamingUnparserElementsDef
+    }.value
+
+  // separate def assists breakpoint debugging
+  private lazy val possibleThisTermNextStreamingUnparserElementsDef: 
PossibleNextElements = {
+    val thisItself: PossibleNextElements = this match {
+      //
+      // An array may be required in the infoset, but the array
+      // may also be terminated by finding the next element after the array,
+      // so we get closed only if required and not an array.
+      //
+      case eb: ElementBase if (eb.isRequiredStreamingUnparserEvent) =>
+        Closed(Seq(PNE(eb, true)))
+      case eb: ElementBase =>
+        Open(Seq(PNE(eb, false)))
+      case stb: SequenceTermBase if stb.isHiddenGroupRef =>
+        Open(Nil)
+      case stb: ChoiceTermBase if stb.isHiddenGroupRef =>
 
 Review comment:
   Update to ctb?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to