You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/03/11 17:54:04 UTC

[GitHub] [daffodil] jadams-tresys commented on a change in pull request #473: Implement variable direction property

jadams-tresys commented on a change in pull request #473:
URL: https://github.com/apache/daffodil/pull/473#discussion_r592576427



##########
File path: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ExpressionEvaluatingUnparsers.scala
##########
@@ -77,31 +78,52 @@ final class SetVariableUnparser(
 
 }
 
+final class NewVariableInstanceSuspendableExpression(
+  override val expr: CompiledExpression[AnyRef],
+  override val rd: VariableRuntimeData)
+  extends SuspendableExpression {
+
+  override protected def processExpressionResult(ustate: UState, v: DataValuePrimitive): Unit = {
+    val vi = ustate.variableMap.find(rd.globalQName)
+    Assert.invariant(vi.isDefined)
+    // Reset original variable's state from VariableInProcess

Review comment:
       This really should always just be VariableDefined and setting to the priorState was a round about way of doing just that. Making the change now.




----------------------------------------------------------------
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:
users@infra.apache.org