mbeckerle commented on a change in pull request #214: Sequences and Separators
Refactoring and Rewrite
URL: https://github.com/apache/incubator-daffodil/pull/214#discussion_r284795231
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/Term.scala
##########
@@ -297,31 +317,31 @@ trait Term
res
}
+ /**
+ * One-based position in the nearest enclosing sequence.
+ * Follows backpointers from group defs to group refs until it
+ * finds a sequence.
+ */
final lazy val positionInNearestEnclosingSequence: Int = {
Review comment:
Classic example of a method that creates a pointless need for the
backpointers to parent that make structure sharing of the DSOM objects
impossible. This should be a value passed down to a SequenceChild constructor,
and the algorithms that use this should be on SequenceTermBase or child classes
thereof.
----------------------------------------------------------------
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