tuxji commented on a change in pull request #667:
URL: https://github.com/apache/daffodil/pull/667#discussion_r735958262
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/ChoiceCombinator.scala
##########
@@ -219,7 +192,7 @@ case class ChoiceCombinator(ch: ChoiceTermBase,
alternatives: Seq[Gram])
}
})
- val dispatchBranchKeyMap =
dispatchBranchKeyValueTuples.toMap.mapValues(gram => {
+ val dispatchBranchKeyMap = dispatchBranchKeyValueTuples.toMap.mapValues
{ gram =>
val isRepresented = true // FIXME: Verify is ok? Was:
gram.context.enclosingTerm.get.isRepresented
Review comment:
Can the FIXME comment be removed or taken care of at this time too?
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/ChoiceCombinator.scala
##########
@@ -229,17 +202,11 @@ case class ChoiceCombinator(ch: ChoiceTermBase,
alternatives: Seq[Gram])
gramParser
}
(parser, isRepresented)
- })
+ }
val serializableMap: Map[String, (Parser, Boolean)] =
dispatchBranchKeyMap.map(identity)
val serializableKeyRangeMap: Vector[(RangeBound, RangeBound, Parser,
Boolean)] = dispatchBranchKeyRangeTuples.toVector.map(identity)
- ch.defaultableChoiceDispatchKeyKind match {
- case ChoiceKeyKindType.ByType =>
- new ChoiceDispatchCombinatorKeyByTypeParser(ch.termRuntimeData,
ch.optRepTypeElement.get.enclosedElement.parser,
ch.optRepTypeElement.get.elementRuntimeData, serializableMap,
serializableKeyRangeMap)
Review comment:
Can we remove the `ChoiceDispatchCombinatorKeyByTypeParser` class at
this time too?
--
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]