You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/07/09 16:42:21 UTC

[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #259: Incremental progress on schema compilation space/speed issue.

stevedlawrence commented on a change in pull request #259: Incremental progress on schema compilation space/speed issue.
URL: https://github.com/apache/incubator-daffodil/pull/259#discussion_r301545723
 
 

 ##########
 File path: daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala
 ##########
 @@ -943,155 +950,148 @@ sealed abstract class StepExpression(val step: String, val pred: Option[Predicat
     NodeInfo.ArrayIndex
   }
 
+}
+
+sealed abstract class DownStepExpression(s: String, predArg: Option[PredicateExpression])
+  extends StepExpression(s, predArg) {
+
   override lazy val inherentType: NodeInfo.Kind = {
     if (!isLastStep) NodeInfo.Complex
     else {
-      if (stepElement.optPrimType.isDefined) {
+      if (stepElements.head.optPrimType.isDefined) {
         // simple type, so
-        val pt = stepElement.optPrimType.get
+        val pt = stepElements.head.optPrimType.get
         pt
       } else {
         NodeInfo.Complex
       }
     }
   }
-
 }
 
-//TODO: Is ".[i]" ever a valid expression in DFDL?
+// TODO: Is ".[i]" ever a valid expression in DFDL?
+// Yes. For an array element, .[1] is the first occurrence.
 
 Review comment:
   Does this not currently work? Can we add a bug to track this if not? If it does work, this comment is maybe misleading and should probably be removed.

----------------------------------------------------------------
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


With regards,
Apache Git Services