Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/metron/pull/814#discussion_r147784210
  
    --- Diff: 
metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/StellarCompiler.java
 ---
    @@ -105,59 +107,77 @@ public Object apply(ExpressionState state) {
           Deque<Token<?>> instanceDeque = new ArrayDeque<>();
           {
             boolean skipElse = false;
    +        boolean skipMatchClauses = false;
             Token<?> token = null;
             for (Iterator<Token<?>> it = getTokenDeque().descendingIterator(); 
it.hasNext(); ) {
               token = it.next();
               //if we've skipped an else previously, then we need to skip the 
deferred tokens associated with the else.
    -          if(skipElse && token.getUnderlyingType() == ElseExpr.class) {
    -            while(it.hasNext()) {
    +          if (skipElse && token.getUnderlyingType() == ElseExpr.class) {
    +            while (it.hasNext()) {
                   token = it.next();
    -              if(token.getUnderlyingType() == EndConditional.class) {
    +              if (token.getUnderlyingType() == EndConditional.class) {
                     break;
                   }
                 }
                 skipElse = false;
               }
    +          if (skipMatchClauses && (token.getUnderlyingType() == 
MatchClauseEnd.class
    +              || token.getUnderlyingType() == MatchClauseCheckExpr.class)) 
{
    +            while (it.hasNext()) {
    --- End diff --
    
    This is another issue with validate


---

Reply via email to