mbeckerle commented on a change in pull request #207: Added support for
enumerations and TypeValueCalc
URL: https://github.com/apache/incubator-daffodil/pull/207#discussion_r275129209
##########
File path: daffodil-lib/src/main/scala/org/apache/daffodil/util/Cursor.scala
##########
@@ -160,18 +196,24 @@ trait CursorImplMixin[AccessorType <:
Accessor[AccessorType]] { self: Cursor[Acc
val res = priorOpKind match {
case Advance => {
priorOpKind = Inspect
- doAdvance(true)
+ doAdvance(true, true)
}
- case Inspect => true // inspect again does nothing.
+ case InspectPure => {
+ priorOpKind = Inspect
+ doAdvance(true, advanceInput=false)
+ }
+ case Inspect => true // inspect again does nothing.
case Unsuccessful => return false
}
// successful
Assert.invariant(isFilled == true || !res)
res
}
- private def doAdvance(isFilledValue: Boolean) = {
- val res = fill()
+ //inpsectPure implemented in InfosetInputter.scala
+
+ private def doAdvance(isFilledValue: Boolean, advanceInput: Boolean) = {
Review comment:
Having a method doAdvance with a flag argument called advanceInput is pretty
confusing. Can you provide a comment to clarify what side effects doAdvance
does that aren't suppressed by advanceInput false?
----------------------------------------------------------------
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