Beispiel #1
0
 public override void Visit(ActionPred pred)
 {
     if (!_recognizerMode)
     {
         AddUserAction(pred.Statements);
     }
 }
 public override void Visit(ActionPred pred)
 {
     VisitOther(pred);
     foreach (var stmt in pred.Statements)
     {
         VisitCode(pred, stmt);
     }
 }
Beispiel #3
0
 public override void Visit(ActionPred pred)
 {
     if (pred.Next is AndPred && !_codeBeforeAndWarning)
     {
         LLPG.Output(Severity.Warning, pred,
                     "It's poor style to put a code block {..} before an and-predicate &{..} because the and-predicate normally runs first.");
         _codeBeforeAndWarning = true;
     }
 }
Beispiel #4
0
 public override void Visit(ActionPred pred)
 {
     if (pred.Next is AndPred && !_codeBeforeAndWarningPrinted)
     {
         // Block warning in case this is a synthetic action created by AutoValueSaverVisitor
         if (pred.Basis != _currentRule.Basis)
         {
             LLPG.Output(Severity.Warning, pred,
                         "It's poor style to put a code block {..} before an and-predicate &{..} because the and-predicate normally runs first.");
             _codeBeforeAndWarningPrinted = true;
         }
     }
 }
Beispiel #5
0
 public virtual void Visit(ActionPred pred)
 {
     VisitOther(pred);
 }