stevedlawrence commented on a change in pull request #214: Sequences and
Separators Refactoring and Rewrite
URL: https://github.com/apache/incubator-daffodil/pull/214#discussion_r285124957
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/LocalElementMixin.scala
##########
@@ -74,20 +74,42 @@ trait LocalElementMixin
res
}.value
- final override def hasKnownRequiredSyntax: Boolean =
LV('hasKnownRequiredSyntax) {
- !couldBeMissing
- }.value
+ final override def hasKnownRequiredSyntax: Boolean = !couldBeMissing
- final def couldBeMissing: Boolean = LV('couldBeMissing) {
+ final lazy val couldBeMissing: Boolean = LV('couldBeMissing) {
val res =
if (minOccurs == 0) true
else if (isNillable && !hasNilValueRequiredSyntax) true
else if (isDefaultable && emptyValueDelimiterPolicy =:=
EmptyValueDelimiterPolicy.None) true
else if (isDefaultable && !hasInitiator && emptyValueDelimiterPolicy =:=
EmptyValueDelimiterPolicy.Initiator) true
else if (isDefaultable && !hasTerminator && emptyValueDelimiterPolicy
=:= EmptyValueDelimiterPolicy.Terminator) true
- else if (hasInitiator) false
- else if (hasTerminator) false
- else if (isSimpleType) {
+ else if (hasInitiator) {
+ //
+ // TODO: It is possible that this constant expression cannot match
zero length
Review comment:
Is "constant expression" correct here? Should that be "initiator"?
----------------------------------------------------------------
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