mbeckerle commented on a change in pull request #12: Revised daffodil-io module 
to require passing in a FormatInfo object.
URL: https://github.com/apache/incubator-daffodil/pull/12#discussion_r157908185
 
 

 ##########
 File path: 
daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/processors/parsers/ElementKindParsers.scala
 ##########
 @@ -49,7 +50,7 @@ class ComplexTypeParser(rd: RuntimeData, bodyParser: Parser)
 
   def parse(start: PState): Unit = {
     start.mpstate.childIndexStack.push(1L) // one-based indexing
-    bodyParser.parse1(start)
+    start.parse1(bodyParser)
 
 Review comment:
   Not sure this is right. The call to parse1 is on the parser, it calls parse1 
on the state, which calls parse2 on the parser which calls parse. 
   
   I think the right invariant is that parsers call the parse1 method of their 
child parsers. The same as it always has been. 
   
   The start.parse1 method should be renamed really. Unless we decide we don't 
need it at all.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to