mbeckerle commented on a change in pull request #686:
URL: https://github.com/apache/daffodil/pull/686#discussion_r758705252
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/ExpressionEvaluatingParsers.scala
##########
@@ -161,15 +162,18 @@ class SetVariableParser(expr: CompiledExpression[AnyRef],
decl: VariableRuntimeD
}
}
-class NewVariableInstanceStartParser(override val context: VariableRuntimeData)
+final class NewVariableInstanceStartParser(vrd: VariableRuntimeData, trd:
TermRuntimeData)
extends PrimParser {
+
+ override def context = trd
Review comment:
Hmmm. The VRD actually just identifies what variable, right? I don't
think there is a NVIRuntimeData object. Nor a SetVariableRuntimeData that
contain the say, line number and file info for that schema component. So
existing error messages are going to refer to the variable itself. Using the
TermRuntimeData of the term is going to be a better error message than using
the VRD (which is what we had been doing.)
There's a NonTermRuntimeData object which could potentially be the
representative object for these NVI or SetVar statements. But I wouldn't change
this currently.
--
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]