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



##########
File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/HasStatementsGrammarMixin.scala
##########
@@ -18,10 +18,11 @@
 package org.apache.daffodil.grammar
 
 import org.apache.daffodil.dsom.Term
+import org.apache.daffodil.dsom.DFDLNewVariableInstance
 
 trait HasStatementsGrammarMixin extends GrammarMixin { self: Term =>
 
-  private lazy val statementGrams = statements.map { _.gram(self) }
+  private lazy val statementGrams = statements.filter{ st => 
!st.isInstanceOf[DFDLNewVariableInstance] }.map { _.gram(self) }

Review comment:
       Actually, according to the spec we probably aren't doing the evaluation 
order of statement annotations correctly. Before NVI are supposed to be 
processed we are supposed to evaluate discriminators/asserts with 
test="pattern", but I think that may require significant changes and is outside 
the scope of this pull request.
   I'll make the suggested changes of adding more clear names and comments.




----------------------------------------------------------------
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:
[email protected]


Reply via email to